Datometry solutions such as Hyper-Q and qShift may require the execution of SQL batch files against Azure Synapse Analytics by the database administrator. A commonly used and often readily available client application to execute these batch files is the command line tool sqlcmd
, which is part of the Microsoft Tools for SQL Server. To process batch files with multiple DDL statements successfully, such as installing and upgrading Hyper-Q standard UDFs or applying qShift-generated output, sqlcmd
requires a dedicated separator between statements. There are two ways to achieve this:
- Insert the word
GO
on a separate line between every two statements in the batch file. - Leverage a different word as a separator, which already exists in the batch file and is placed on a separate line between statements.
Option 1 can easily be used with qShift output by requesting from your Datometry representative that the qShift output be suffixed with GO
when generated for you.
Option 2 can be used out of the box with installing or upgrading Hyper-Q standard UDFs. The source files are formatted with a ;
(semicolon) on a separate line between statements. Using the command line argument -c ';'
with sqlcmd
instructs it to treat the semicolon as batch separator.
Comments
0 comments
Please sign in to leave a comment.