Specifying an SQL SELECT statement

You can read an Oracle table by specifying an SQL SELECT statement.

If you choose the -query option, you pass an SQL query to the operator. The query specifies the table and the processing that you want to perform 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 -query:

  • The -query might not contain bind variables.
  • If you want to include a filter or select list, you must specify them as part of the query.
  • The query runs sequentially by default, but can be run in parallel if you specify the -part option.
  • You can specify an optional open and close command. Oracle runs these commands immediately before the database connection is opened and after it is closed.
    Note: Complex queries executed in parallel might cause the database to consume large amounts of system resources.

See Example 2: reading from an Oracle table in parallel with the query option for an example of using the -query option.