question

Rishabh-4125 avatar image
0 Votes"
Rishabh-4125 asked HimanshuSinha-MSFT commented

How to pass column list as argument from databricks spark for copy write semantic

Is there a way to pass column list argument for column mapping between spark and synapse table from databricks spark for write semantics as copy as we pass it while running copy command from synapse?

azure-synapse-analyticsazure-databricks
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello ,
Just wanted to follow up and check if the below suggestion helped you resolve the issue . Also if case if you have a better work around or resolution please do share that with the community as it will help other community members .

Thanks & stay safe

Himanshu

0 Votes 0 ·

Hello,

Just wanted to check again if the below suggestion helped you resolve the issue . Also if case if you have a better work around or resolution please do share that with the community as it will help other community members .

Thanks
Himanshu

0 Votes 0 ·

1 Answer

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello Rishabh ,
Thanks for the ask and also using the forum .

As I understand the ask here is understand as to how column name ( with mapping) can be used in the copy command on Synapse .

Below is the command and screenshot whcih should help you out with that .


 COPY INTO NameofTheTable( NameOfTheSourceColumn IndexOfTheColumnOnTheSinkSide)

13972-copy-command.png


Please do let me know how it goes .


Thanks & stay safe

Himanshu

Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members



copy-command.png (55.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.