Page 1 of 1

How to pass a Multiline SQL query as parameter

Posted: Thu Jul 20, 2017 12:23 am
by sreesuku2
Hi Team,

I have a generic ETL job which takes the SQL query given by user and loads a specific target table. Currently I have created a parameter to take the SQL query from user, however its not taking multi line queries. The complete query need to be given in one line.

Is there any other ways I can use to achieve this.

Note : I am using Enterprise SQL stage as Source stage and ODBC stage as Target stage.

Regards
Sree

Posted: Thu Jul 20, 2017 6:00 am
by Timato
In my experience, DataStage doesnt like passing in multiline parameters at all. Perhaps consider sanitising the parameter value that you receive when passing it into the job?

You could also try writing the query into a text file and then parameterising the stage to read the query from a file instead?