Skip to content

Commit

Permalink
Polish Etl template
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Mar 26, 2019
1 parent b1b9611 commit 0062f79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
9 changes: 6 additions & 3 deletions equinox-etl/Etl/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,14 @@ let main argv =
let colls = CosmosCollections(args.Destination.Database, args.Destination.Collection)
Equinox.Cosmos.Core.CosmosContext(destination, colls, Log.ForContext<Core.CosmosContext>())
let auxDiscovery, aux, leaseId, startFromHere, batchSize, lagFrequency = args.BuildChangeFeedParams()
//#if !marveleqx
#if marveleqx
let createSyncHandler () = createRangeSyncHandler log target transformV0
#else
let createSyncHandler () = createRangeSyncHandler log target transform
//#else
#endif
//#if Testing
let createSyncHandler () = createRangeSyncHandler log target transformV0
//#endif
//#endif
run (discovery, source) (auxDiscovery, aux) connectionPolicy
(leaseId, startFromHere, batchSize, lagFrequency)
createSyncHandler
Expand Down
10 changes: 5 additions & 5 deletions equinox-etl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This project was generated using:
2. We'll be operating a changefeed, so use `eqx initaux` to make a `-aux` collection (unless there already is one)

# (either add environment variables as per step 0 or use -s/-d/-c to specify them)
# default name is "($EQUINOX_COSMOS_COLLECTION)-aux"
# default name is "($EQUINOX_COSMOS_COLLECTION)-aux"
eqx initaux -ru 400 cosmos

3. To run an instance of the Etl tool
Expand All @@ -39,12 +39,12 @@ This project was generated using:
# `defaultEtl` defines the Projector Group identity - each id has separated state in the aux collection (aka LeaseId)
# `-m 1000` sets the max batch size to 1000
# `cosmos` specifies the destination (if you have specified 3x EQUINOX_COSMOS_* environment vars, no arguments are needed)
# `source -s connection -d database -c collection` specifies the input datasource
# `source -s connection -d database -c collection` specifies the input datasource

$env:EQUINOX_COSMOS_CONNECTION_SOURCE="AccountEndpoint=https://....;AccountKey=....=;" # or use -s
$env:EQUINOX_COSMOS_CONNECTION_SOURCE="AccountEndpoint=https://....;AccountKey=....=;" # or use -s
$env:EQUINOX_COSMOS_DATABASE_SOURCE="input-database" # or use -d
$env:EQUINOX_COSMOS_COLLECTION_SOURCE="input_collection" # or use - c

dotnet run -p Etl -- defaultEtl `
source -s $env:EQUINOX_COSMOS_CONNECTION_SOURCE -d $env:EQUINOX_COSMOS_DATABASE_SOURCE -c $env:EQUINOX_COSMOS_COLLECTION_SOURCE `
cosmos # Can add overrides for destination here
source -s $env:EQUINOX_COSMOS_CONNECTION_SOURCE -d $env:EQUINOX_COSMOS_DATABASE_SOURCE -c $env:EQUINOX_COSMOS_COLLECTION_SOURCE `
cosmos # Can add overrides for destination here
5 changes: 0 additions & 5 deletions equinox-etl/equinox-etl.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".template.config", ".template.config", "{A65E6AE8-BB46-4AF4-AF1A-3690B5D445C9}"
ProjectSection(SolutionItems) = preProject
.template.config\template.json = .template.config\template.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down

0 comments on commit 0062f79

Please sign in to comment.