Hi @Lou Driehuis ,
Thanks for using Microsoft Q&A !!
Please find below the .NET Code for your reference which you could use to add a Tabular Translator to a Copy Data activity.
PipelineResource newSQLPipeline = new PipelineResource
{
Parameters = new Dictionary<string, ParameterSpecification>
{
{ "inputPath", new ParameterSpecification { Type = ParameterType.String } },
{ "outputPath", new ParameterSpecification { Type = ParameterType.String } }
},
Activities = new List<Activity>
{
new CopyActivity
{
Name = "CopyData",
Inputs = new List<DatasetReference>
{
new DatasetReference()
{
ReferenceName = sqlSourceDatasetName
}
},
Outputs = new List<DatasetReference>
{
new DatasetReference
{
ReferenceName = sqlSinkDatasetName
}
},
Source = new SqlSource { },
Sink = new SqlSink { },
Translator = new TabularTranslator()
{
Mappings = new List<Dictionary<string,Dictionary<string,string>>>()
{
new Dictionary<string, Dictionary<string,string>>()
{
{ "source",new Dictionary<string, string>(){{"name","Id" }}},
{ "sink",new Dictionary<string, string>(){{"name","CustomerId" }}}
},
new Dictionary<string, Dictionary<string,string>>()
{
{ "source",new Dictionary<string, string>(){{"name","Name" }}},
{ "sink",new Dictionary<string, string>(){{"name","LastName" }}}
},
new Dictionary<string, Dictionary<string,string>>()
{
{ "source",new Dictionary<string, string>(){{"name", "LastModifiedDate" } }},
{ "sink",new Dictionary<string, string>(){{"name", "ModifiedDate" } }}
}
},
}
}
}
};
Results:
Data Factory Mapping section -
Please let me know if you have any questions.
Thanks
Saurabh
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.