I have a ADF pipeline with an ODATA source.
I'm copying that into an SQL database using autocreate table. I would like to autogenerate the table name as well, but I can't figure out how it's done.
The name I would like to use is the Path name from the source:
It should somehow be used as the table name:
Is this possible in ADF?
CodePudding user response:
Can I get table name from source path in ADF?
we cant access dataset name in pipeline to work around this we can get dataset name by creating parameter
To get Source table name in sink first we have to create parameter or variable in pipeline with name tablename and type string.
Then create parameter in source dataset as table name with type string.
Then in the path add dynamic value @dataset().tablename
to get value of parameter created in above step.
In dataset properties add dynamic value for table name @pipeline().parameters.tablename
to get value from pipeline parameter and pass this value to source dataset.
Then create parameter in sink dataset as table name with type string.
Then in the schema name add dbo
and in tablename add dynamic value @dataset().tablename
to get value of parameter created in above step.
In dataset properties add dynamic value for table name @pipeline().parameters.tablename
to get value from pipeline parameter and pass this value to sink dataset.
Successfully copied table with same name from ODATA source to SQL database.
Note: I have table name Airlines in my ODATA source.