Reputation: 13
How can we access the column in dynamic expression of pre copy script in adf copy activity As I need to trim) substring the excess characters coming from source before loading into sql db.
Can anyone help me with expression.
Eg: suppose I have column called 'address' and it has data more than 50 characters . Can this data be trimmed before loading in sink.
Since I don't want to make changes in target dB and would like to handle it before loading.
Thanks in advance.
Upvotes: 0
Views: 533
Reputation: 646
Parul, I would utilize a dataflow:
1) Create a new mapping dataflow
2) Use your original table as a source.
3.1) If you really need the stripped address column in your output table, add a new "Derived Column" step and use "left (address, 50)" expression, add "select" step to get rid of the original address column.
3.2) If you don't need it at all, use "select" step and remove it.
4) Sink your table
5) In your pipeline, add "Move & Transform" -> "Data Flow" activity and choose the dataflow you created
Hope that helps
Upvotes: 2