Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
talendstar
Creator
Creator

run SQL Script for Snowflake

Is it possible to run a SQL Script for Snowflake from within Talend.

 

The SQL consists of various statements. Some create temporary tables that are referenced later in the SQL.

 

Basically it is a multi-statement SQL script.

 

thanks

Labels (2)
2 Replies
manodwhb
Champion II
Champion II

@talendstar ,As per my knowledge , tSnowflakeRow is not supporting  to execute multiple scripts,you can execute for one script. 

Anonymous
Not applicable

The simplest solution consists in 3 components:

  • load your script with tFileInputDelimited or tFixedFlowInput from pasted text within "inline content"
    • configure row separator as ";" and field separator as "#"
    • add attribute column "content" of type String
  • iterate over individual query statements (newline separators are allowed)
    • link your input row with tFlowToIterate (e.g. row1)
    • link your iteraation with tSnowflakeRow
  • execute query: (String)globalMap.get("row1.content")

 

In case you need to render your script from input parameters, then you may want to look at Talend SQL templates.