Gourav Dutta
Gourav Dutta

Reputation: 553

Can we use SQL scripts (Develop hub) during pipeline creation (Integrate hub) in azure synapse?

I want to use my SQL script (present under Develop hub) file inside a Pipeline (present under Integrate hub). Currently I do not see any Activities available solving this purpose.

There is one Script activity under General section which only have a Query & NonQuery option, not for referring any SQL script file created earlier.

Is that feature available at all in Azure Synapse Analytics? Can we refer to SQL script by some other means?

Upvotes: 2

Views: 816

Answers (1)

wBob
wBob

Reputation: 14389

If your Synapse workspace is paired with Azure DevOps then I imagine it’s easy to get the file content with a REST API call (eg here). However then you have to parse the file as GO is not supported by the Script activity. ADF / Synapse Pipeline functions do not support a RegEx style split eg word boundary and GO (\bGO\b) so it starts to get kind of fiddly. I had some success with replace and uriComponent functions.

However you would be better of using Stored Procedures and the Stored Proc activity in Synapse Pipelines - much simpler implementation.

Upvotes: 0

Related Questions