question

SarveshPandey-7139 avatar image
0 Votes"
SarveshPandey-7139 asked HimanshuSinha-MSFT answered

How to move Table varaible to Azure Data warehouse using Azure Data Factory

We have a table name "@tablename" in SQL Server 2016. Using ADF, we are moving data from SQL Server to Azure DW but it throws a error - ErrorCode=InvalidTemplate, ErrorMessage=Unable to parse expression 'tablename': expected token 'LeftParenthesis' and actual 'EndOfData'."

Is there any way to move table variable through ADF?

azure-data-factoryazure-synapse-analytics
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.

VaibhavChaudhari avatar image
0 Votes"
VaibhavChaudhari answered

There must be some code which is filling data in Table variable. You can try providing that select query in Copy activity source and load data to target.


Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

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.

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

Hello @SarveshPandey-7139 ,
I tried the below query and it just wroked fine . There is something else which is wrong in our case .

DECLARE @LOCAL_TABLEVARIABLE TABLE
(Name varchar(100)
)
INSERT INTO @LOCAL_TABLEVARIABLE values('Jon doe')
SELECT Name from @LOCAL_TABLEVARIABLE





95706-2021-05-11-12-05-45-analytics-moveandtransform-ver.png




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.