{
"Source": "json",
"Sink": "cosmos-nosql",
"SourceSettings": {
"FilePath": "https://mytestfiles.local/sales-data.json"
},
"SinkSettings": {
"ConnectionString": "AccountEndpoint=https://...",
"Database": "myDb",
"Container": "myContainer",
"PartitionKeyPath": "/id",
"RecreateContainer": true,
"WriteMode": "Insert",
"CreatedContainerMaxThroughput": 5000,
"IsServerlessAccount": false
}
}{
"Source": "Cosmos-NoSql",
"Sink": "JSON",
"SourceSettings":
{
"ConnectionString": "AccountEndpoint=https://...",
"Database":"cosmicworks",
"Container":"customers",
"IncludeMetadataFields": true
},
"SinkSettings":
{
"FilePath": "c:\\data\\cosmicworks\\customers.json",
"Indented": true,
"ItemProgressFrequency": 1000
}
}{
"Source": "Cosmos-NoSql",
"Sink": "MongoDB",
"SourceSettings": {
"ConnectionString": "AccountEndpoint=https://...",
"Database": "cosmicworks",
"Container": "baskets"
},
"SinkSettings": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "mydb",
"Collection": "baskets",
"IdFieldName": "id"
}
}Note: The
IdFieldNameparameter specifies which field from the source should be mapped to MongoDB's_idfield. In this example, theidfield from Cosmos will be used as the_idin MongoDB while also keeping the originalidfield in the document.
{
"Source": "mongodb",
"Sink": "cosmos-nosql",
"SourceSettings": {
"ConnectionString": "mongodb://...",
"DatabaseName": "sales",
"Collection": "person"
},
"SinkSettings": {
"ConnectionString": "AccountEndpoint=https://...",
"Database": "users",
"Container": "migrated",
"PartitionKeyPath": "/id",
"ConnectionMode": "Direct",
"WriteMode": "UpsertStream",
"CreatedContainerMaxThroughput": 8000,
"UseAutoscaleForCreatedContainer": false
}
}{
"Source": "MongoDB-Legacy (Wire v2)",
"Sink": "cosmos-nosql",
"SourceSettings": {
"ConnectionString": "******mycluster.documents.azure.com:10255/?ssl=true",
"DatabaseName": "sales",
"Collection": "person"
},
"SinkSettings": {
"ConnectionString": "AccountEndpoint=https://...",
"Database": "users",
"Container": "migrated",
"PartitionKeyPath": "/id",
"ConnectionMode": "Direct",
"WriteMode": "UpsertStream",
"CreatedContainerMaxThroughput": 8000,
"UseAutoscaleForCreatedContainer": false
}
}{
"Source": "SqlServer",
"Sink": "AzureTableApi",
"SourceSettings": {
"ConnectionString": "Server=...",
"QueryText": "SELECT Id, Date, Amount FROM dbo.Payments WHERE Status = 'open'"
},
"SinkSettings": {
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=...",
"Table": "payments",
"RowKeyFieldName": "Id"
}
}{
"Source": "AzureTableAPI",
"Sink": "JSON",
"SourceSettings": {
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=<storage-account-name>;AccountKey=<key>;EndpointSuffix=core.windows.net",
"Table": "SourceTable1",
"PartitionKeyFieldName": "PartitionKey",
"RowKeyFieldName": "RowKey",
"QueryFilter": "Timestamp ge datetime\u00272023-05-15T03:30:32.663Z\u0027"
},
"SinkSettings": {
"FilePath": "D:\\output\\filtered-data.json",
"Indented": true
}
}Note: When using DateTime filters in the
QueryFilterproperty, single quotes around the datetime value must be JSON-escaped as\u0027. The datetime must be in ISO 8601 format with thedatetimeprefix.
{
"Source": "cosmos-nosql",
"Sink": "sqlserver",
"SourceSettings":
{
"ConnectionString": "AccountEndpoint=https://...",
"Database":"operations",
"Container":"alerts",
"PartitionKeyValue": "jan",
"Query": "SELECT a.name, a.description, a.count, a.id, a.isSet FROM a"
},
"SinkSettings":
{
"ConnectionString": "Server=...",
"TableName": "Import",
"ColumnMappings": [
{
"ColumnName": "Name"
},
{
"ColumnName": "Description"
},
{
"ColumnName": "Count",
"SourceFieldName": "number"
},
{
"ColumnName": "Id"
},
{
"ColumnName": "IsSet",
"AllowNull": false,
"DefaultValue": false
}
]
}
}{
"Source": "Cosmos-nosql",
"Sink": "Json-AzureBlob",
"SourceSettings": {
"UseRbacAuth": true,
"Database": "operations",
"Container": "alerts",
"PartitionKeyValue": "jan",
"AccountEndpoint": "https://<databaseaccount>.documents.azure.com",
"EnableInteractiveCredentials": true,
"IncludeMetadataFields": false,
"Query": "SELECT a.name, a.description, a.count, a.id, a.isSet FROM a"
},
"SinkSettings": {
"UseRbacAuth": true,
"ContainerName": "operations-archive",
"AccountEndpoint": "https://<storage-account>.blob.core.windows.net",
"EnableInteractiveCredentials": true,
"BlobName": "jan-alerts",
"ItemProgressFrequency": 1000
},
"Operations": [
]
}{
"Source": "json",
"Sink": "cosmos-nosql",
"SourceSettings": {
"FilePath": "c:\\data\\sales-data.json"
},
"SinkSettings": {
"ConnectionString": "AccountEndpoint=https://...",
"Database": "myDb",
"Container": "myContainer",
"PartitionKeyPath": "/id",
"WriteMode": "Insert",
"WebProxy": "http://yourproxy.server.com/",
"UseDefaultProxyCredentials": true,
"UseDefaultCredentials": true,
"PreAuthenticate": true
}
}