Specifying an SQL SELECT statement

Reading an external datasource table by specifying an SQL SELECT statement.

When you use the -query option, an SQL query is passed to the odbcread operator. The query does a select on the table as it is read into InfoSphere® DataStage®. The SQL statement can contain joins, views, database links, synonyms, and so on. However, the following restrictions apply to this option:

  • It cannot contain bind variables.
  • If you want to include -filter or -list options, you must specify them as part of the query.
  • The query runs sequentially.
  • You can specify optional open and close commands. These commands can be run just before reading data from a table and after reading data from a table.