I am using Microsoft Azure Data Factory .NET SDK in order to automate dataset creation for a large number of tables.
A method within my .NET console application provides me the ability to create input and output datasets, based on a specified table name:
createInputDataSet(string table_Name, DataFactoryManagementClient client) {
client.Datasets.CreateOrUpdate(resourceGroupName, dataFactoryName,
new DatasetCreateOrUpdateParameters()
{
Dataset = new Dataset()
{
Properties = new DatasetProperties()
{
Structure = new List<DataElement>()
{
//TODO: Autogenerate columns and types
new DataElement() {Name = "name", Type = "String" },
new DataElement() {Name = "date", Type = "Datetime" }
}
}...
Currently, dataset creation is accomplished through a stored procedure on either source SQL Server or target SQL Data Warehouse. The stored procedure specifies a table name and then looks into INFORMATION_SCHEMA
in order to generate valid columns and types for each ADF dataset. We then manually copy the result into portal.azure.com.
We have over 600 datasets, so need to utilize the .NET SDK for automated copy to ADF.
How does one create datasets automatically, while taking into account that each dataset's structure (i.e. columns and types) will differ?