How to pass a Multiline SQL query as parameter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sreesuku2
Participant
Posts: 45
Joined: Tue Oct 22, 2013 11:45 am

How to pass a Multiline SQL query as parameter

Post 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
Timato
Participant
Posts: 24
Joined: Tue Sep 30, 2014 10:51 pm

Post 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?
Post Reply