question

RohitKulkarni-6062 avatar image
0 Votes"
RohitKulkarni-6062 asked ·

Pipeline Issue

Hello Team, I am trying to create a view in the SQL Server after uploading the data in csv format from one container(raw) to staging zone by entering the parameter for Company.it is working perfectly if I pass the parameter for Table name is like "Vendor". if i pass the parameter for the table name called "Vendor Amount" then it is giving below error in lookup(Drop View).I think because there is a space between Vendor and Amount . Failure happened on 'Source' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Incorrect syntax near 'Amount'.',Source=,''Type=System.Data.SqlClient.SqlException,Message=Incorrect syntax near 'Amount'.,Source=.Net SqlClient Data Provider,SqlErrorNumber=102,Class=15,ErrorCode=-2146232060,State=1,Errors=[{Class=15,Number=102,State=1,Message=Incorrect syntax near 'Amount'.,},],' But the view is getting created in . Please refer below my pipeline : ![73050-image.png][1] [1]: /answers/storage/attachments/73050-image.png

azure-data-factory
10 |1000 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 ·

Try giving view name in square brackets like CREATE VIEW [Vendor Amount]


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

·
10 |1000 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.

RohitKulkarni-6062 avatar image
0 Votes"
RohitKulkarni-6062 answered ·

Hello Vaibhav, I tried passing the parameter like [Vendor Amount].Please refer the below error in azure function: Call to provided Azure function 'CreateSynapseOnDemandViewFromModelJson' failed with status-'InternalServerError' and message - 'Invoking Azure function failed with HttpStatusCode - InternalServerError.'. ![73180-image.png][1] [1]: /answers/storage/attachments/73180-image.png Regards RK

· 1 ·
10 |1000 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.

I think Azure function is working fine already as shown in screenshot in original question. But there is error in lookup activity. What code does that lookup activity has?

0 Votes 0 ·
RohitKulkarni-6062 avatar image
0 Votes"
RohitKulkarni-6062 answered ·

Thanks Vaibhav forgiving me hint.

There was a issue in the lookup Activity.

IF EXISTS (SELECT 1 FROM sys.objects o JOIN sys.schemas s on o.schema_id = s.schema_id WHERE o.type = 'V' AND o.name = '@{pipeline().parameters.EntityName}' AND s.name = '@{pipeline().parameters.TargetSchema}' ) DROP VIEW [@{pipeline().parameters.TargetSchema}].[@{pipeline().parameters.EntityName}]

SELECT 1;


I had used

Before :
DROP VIEW @{pipeline().parameters.TargetSchema}.@{pipeline().parameters.EntityName}

And after rectified and mentioned [] it got worked:

DROP VIEW [@{pipeline().parameters.TargetSchema}].[@{pipeline().parameters.EntityName}]


Regards
RK

· 3 ·
10 |1000 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.

Please accept the answer on the post which is helping and providing the solution. You have been marking your own posts as answer. :)
Same is the case here - https://docs.microsoft.com/en-us/answers/questions/263255/serverless-db-stop.html

0 Votes 0 ·

I am not getting Accept and Answer Button .Please refer the screenshot below : ![73274-image.png][1] [1]: /answers/storage/temp/73274-image.png

0 Votes 0 ·

Click on Unmark answer done on previous post then you should see Accept answers on other posts

0 Votes 0 ·