Some sweet code that will copy tables from one Azure Table storage to another Table Storage or to Azure SQL database.
If you want to learn more visit
- Create a source Azure Storage account and add a table with the structure as per file 001_CreateUserType.sql. Remember that order of the columns matters, it seems like it's identical to Azure Storate Explorer order: Partition Key + RowKey + Timestamp + other columns alphabetically.
- Create a target storage account OR Azure SQL database (it depends what scenario you want to run, there are two console apps in this solution)
- Create an application in Azure Active Directory - add applicationId and authenticationKey to appsettings.json
- Configure other properties in appsettings.json (if you want to migrate to SQL, remember about appsettings.json in DbUp project)
- If you migrate to SQL run DbUp project
If you don't want to use stored procedure and you would prefer SQL tables to autocreate, Schema
and Table
properties in AzureSqlTableDataset
are mandatory.
new AzureSqlTableDataset
{
LinkedServiceName = new LinkedServiceReference
{
ReferenceName = sqlDatabaseLinkedServiceName
},
Schema = "dbo",
Table = tableName
}
- .NETCore 3.1
- Microsoft.Azure.Management.DataFactory 4.8.0
- Microsoft.Azure.Management.ResourceManager 3.4.0-preview
- https://docs.microsoft.com/en-us/azure/data-factory/connector-sql-server
- https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-table-storage
MIT