I have created a pipeline in Azure Synapse consisting of two steps:
In the CSV file, the first row serves as a delimiter and has the following structure: dbName, schema, src_table, dest_table
When running the Lookup activity (only reading the file content), I get the following output (where we see that we have a null value in dest_table):
This value is then sent as a parameter to the sink dataset used (ADLS Parquet). See below:
This Integration Dataset (Sink Dataset) is configured as follows:
So, the conditions are as follows:
How is it that when we don't provide a value for the filename, it defaults to "schema.table"? See the picture below to see the final result of the data transport and parquet file creation.
As per the details you provided it is creating the file with the SchemaName.TableName
when the value for filename in dataset is null.
AFAIK It is default beg=haviour of ADF when you store the data from any database to Blob storage and don't set any name for destination file it will automatically create the file with name as Source SchemaName.TableName
The workaround can be used as if else activity. To check the value of dest_table
:
To check the value of dest_table
if its null or not if not null use @equals(item().dest_table,null)
this expression.
If it is null the then you can set the name for destination file using dyanmic expression in copy activity as below @concat(item().src_table,'_desttableNULL')
it will set value e.g. demo_desttableNULL.
if it's not null then copy activity can take destination table value from CSV file itself.