|
| 1 | +# Example `migrationsettings.json` Files |
| 2 | + |
| 3 | +## JSON to Cosmos-NoSQL |
| 4 | +```json |
| 5 | +{ |
| 6 | + "Source": "json", |
| 7 | + "Sink": "cosmos-nosql", |
| 8 | + "SourceSettings": { |
| 9 | + "FilePath": "https://mytestfiles.local/sales-data.json" |
| 10 | + }, |
| 11 | + "SinkSettings": { |
| 12 | + "ConnectionString": "AccountEndpoint=https://...", |
| 13 | + "Database": "myDb", |
| 14 | + "Container": "myContainer", |
| 15 | + "PartitionKeyPath": "/id", |
| 16 | + "RecreateContainer": true, |
| 17 | + "WriteMode": "Insert", |
| 18 | + "CreatedContainerMaxThroughput": 5000, |
| 19 | + "IsServerlessAccount": false |
| 20 | + } |
| 21 | +} |
| 22 | +``` |
| 23 | + |
| 24 | +## Cosmos-NoSQL to JSON |
| 25 | +```json |
| 26 | +{ |
| 27 | + "Source": "Cosmos-NoSql", |
| 28 | + "Sink": "JSON", |
| 29 | + "SourceSettings": |
| 30 | + { |
| 31 | + "ConnectionString": "AccountEndpoint=https://...", |
| 32 | + "Database":"cosmicworks", |
| 33 | + "Container":"customers", |
| 34 | + "IncludeMetadataFields": true |
| 35 | + }, |
| 36 | + "SinkSettings": |
| 37 | + { |
| 38 | + "FilePath": "c:\\data\\cosmicworks\\customers.json", |
| 39 | + "Indented": true |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +## MongoDB to Cosmos-NoSQL |
| 45 | +```json |
| 46 | +{ |
| 47 | + "Source": "mongodb", |
| 48 | + "Sink": "cosmos-nosql", |
| 49 | + "SourceSettings": { |
| 50 | + "ConnectionString": "mongodb://...", |
| 51 | + "DatabaseName": "sales", |
| 52 | + "Collection": "person" |
| 53 | + }, |
| 54 | + "SinkSettings": { |
| 55 | + "ConnectionString": "AccountEndpoint=https://...", |
| 56 | + "Database": "users", |
| 57 | + "Container": "migrated", |
| 58 | + "PartitionKeyPath": "/id", |
| 59 | + "ConnectionMode": "Direct", |
| 60 | + "WriteMode": "UpsertStream", |
| 61 | + "CreatedContainerMaxThroughput": 8000, |
| 62 | + "UseAutoscaleForCreatedContainer": false |
| 63 | + } |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +## SqlServer to AzureTableAPI |
| 68 | +```json |
| 69 | +{ |
| 70 | + "Source": "SqlServer", |
| 71 | + "Sink": "AzureTableApi", |
| 72 | + "SourceSettings": { |
| 73 | + "ConnectionString": "Server=...", |
| 74 | + "QueryText": "SELECT Id, Date, Amount FROM dbo.Payments WHERE Status = 'open'" |
| 75 | + }, |
| 76 | + "SinkSettings": { |
| 77 | + "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=...", |
| 78 | + "Table": "payments", |
| 79 | + "RowKeyFieldName": "Id" |
| 80 | + } |
| 81 | +} |
| 82 | +``` |
| 83 | + |
| 84 | +## Cosmos-NoSQL to SqlServer |
| 85 | +```json |
| 86 | +{ |
| 87 | + "Source": "cosmos-nosql", |
| 88 | + "Sink": "sqlserver", |
| 89 | + "SourceSettings": |
| 90 | + { |
| 91 | + "ConnectionString": "AccountEndpoint=https://...", |
| 92 | + "Database":"operations", |
| 93 | + "Container":"alerts", |
| 94 | + "PartitionKeyValue": "jan", |
| 95 | + "Query": "SELECT a.name, a.description, a.count, a.id, a.isSet FROM a" |
| 96 | + }, |
| 97 | + "SinkSettings": |
| 98 | + { |
| 99 | + "ConnectionString": "Server=...", |
| 100 | + "TableName": "Import", |
| 101 | + "ColumnMappings": [ |
| 102 | + { |
| 103 | + "ColumnName": "Name" |
| 104 | + }, |
| 105 | + { |
| 106 | + "ColumnName": "Description" |
| 107 | + }, |
| 108 | + { |
| 109 | + "ColumnName": "Count", |
| 110 | + "SourceFieldName": "number" |
| 111 | + }, |
| 112 | + { |
| 113 | + "ColumnName": "Id" |
| 114 | + }, |
| 115 | + { |
| 116 | + "ColumnName": "IsSet", |
| 117 | + "AllowNull": false, |
| 118 | + "DefaultValue": false |
| 119 | + } |
| 120 | + ] |
| 121 | + } |
| 122 | +} |
| 123 | +``` |
0 commit comments