Skip to main content

Database Reader programmer's reference

This section applies when using Database Reader with Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata. For other sources, see:

Database Reader properties

property

type

default value

notes

Connection Profile Name

enum

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

Connection URL

String

  • for Db2` for iSeries (AS/400): jdbc:as400://<host name>:<port>

    for Db2 LUW: jdbc:db2://<host name>:<port>/DB2LUW

    See Runtime considerations when using Database Reader with Db2 sources for more information.

  • for HP NonStop SQL/MX: jdbc:t4sqlmx://<IP address>:<port> or jdbc:t4sqlmx://<IP address>:<port>/catalog=<catalog name>;schema=<schema name>

  • for Sybase: jdbc:jtds:sybase:<ip address>:<port>/<database name>

  • for Teradata: jdbc:teradata://<ip address>/DBS_PORT=<port>,DATABASE=<database name>

For other sources, see links in Database Reader.Database Reader

Create Schema

Boolean

False

If set to True, when Database Reader's output stream is the input stream of an Azure Synapse Writer, BigQuery Writer, Database Writer (for MariaDB, MariaDB Xpand, MySQL, Oracle, PostgreSQL, SQL Server, or YugabyteDB only), Databricks Writer, Fabric Data Warehouse Writer, Fabric Mirror Writer, Iceberg Writer, Snowflake Writer, or Spanner Writer target, the schema(s) and tables specified in the Tables property in the writer will be created in the target.

For example, if the Tables property in the writer is sourceschema1.%,targetschema1.%;sourceschema2.%,targetschema2.% then the schemas targetschema1 and targetschema2 will be created in the target, and all the tables in sourceschema1 and sourceschema2 will be created in the corresponding target schema.

Data types will be mapped as per Data type support & mapping for schema conversion & evolution. Single-column PRIMARY KEY constraints will be replicated in the target. DEFAULT, FOREIGN KEY, NOT NULL, composite PRIMARY KEY, and UNIQUE KEY constraints will not be replicated.

If a table already exists in the target, Striim will verify that the source and target structure match. If they do not, the application will halt and log a TargetTableSchemaMismatchException.

MON output for the target tables will include a schemaCreationStatus of Pending, InProgress, Success, or Failed.

Database Provider Type

String

Default

Controls which icon appears in the Flow Designer and whether Use Connection Profile appears in the web UI..

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

Excluded Tables

String

Data for any tables specified here will not be returned. For example, if Tables uses a wildcard, data from any tables specified here will be omitted. Multiple table names (separated by semicolons) and wildcards may be used exactly as for Tables.

Fetch Size

Integer

100

Sets the maximum number of records to be fetched from the database in a single JDBC method execution (see the discussion of fetchsize in the documentation for your JDBC driver).

JAAS Configuration

String

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

Password

encrypted password

The password for the specified user. See Encrypted passwords.

Parallel Threads

Integer

1

For Fast Snapshot Loading to Azure Synapse, BiqQuery, Databricks, Fabric Data Warehouse, Microsoft Dataverse, or Snowflake, specify the number of threads Database Reader will use. This value should not be higher than the number of tables to be read. For other targets, leave set to the default of 1.

When Database Reader is started, the tables will be distributed among the threads in round-robin fashion, then each thread will read one table at a time. When the Tables property is a list of tables, the tables are read in that order. If the Tables property uses a wildcard, the sequence is determined by the order in which the JDBC driver gives Database Reader the list of tables.

Known issue DEV-49013: the maximum number of tables supported by Parallel Threads is 255.

Query

String

Optionally, specify a single SQL SELECT statement specifying the data to return. You may query tables, aliases, synonyms, and views.

Query is not supported when Create Schema is True, Parallel Threads is greater than 1, or Restart Behavior on IL Interruption is Truncate_target_table or Replace_target_table.

When Query is specified and Tables is not, the WAEvent TableName metadata field value will be QUERY. When both Query and Tables are specified, the data specified by Query will be returned, and the Tables setting will be used only to populate the TableName field.

Wildcards in table names, such as SELECT ... FROM hr.*, are not supported. Specify multiple table names separated by commas.

If the query includes a synonym containing a period, it must be enclosed in escaped quotes. For example: select * from \"synonym.name\"

If using a query when the output of a DatabaseReader source is the input of a DatabaseWriter target, specify the target table name as the value of DatabaseReader's Tables field.

Quiesce on IL Completion

Boolean

False

Restart Behavior on IL Interruption

Enum

Keep target table data

See Fast Snapshot Recovery during initial load.

Return DateTime As

String

Joda

Set to joda to return timestamp values as Joda timestamps.

Set to String to return timestamp values as strings. The primary purpose of this option is to avoid losing precision when microsecond timestamps are converted to Joda milliseconds. The format of the string is yyyy-mm-dd hh:mm:ss.ffffff.

SSL Config

String

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

Tables

String

Specify the table(s) or view(s) to be read.

You may specify multiple tables and views as a list separated by semicolons or with the % wildcard. For example, HR% would read all the tables whose names start with HR. You may use the % wildcard only for tables, not for schemas or databases. The wildcard is allowed only at the end of the string: for example, mydb.prefix% is valid, but mydb.%suffix is not.

If you are using the Query property, specify QUERY as the table name.

Modifying this property can interfere with recovery. If recovery is enabled for the application and it is necessary to modify the tables list, export the application (see Apps page), drop it, update the exported TQL with the new values, and import it (see Apps page).

Use Connection Profile

Boolean

False

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

Username

String

Specify the DBMS user name the adapter will use to log in to the server specified in ConnectionURL.

For all databases, this user must have SELECT permission or privileges on the tables specified in the Tables property. For Db2 on z/OS, this user must also have SELECT privileges on the SYSCOLUMNS, SYSTABLES, and SYSVIEWS catalog tables. For Oracle, this user must also have SELECT privileges on DBA_TAB_COLS and ALL_COLL_TYPES.

Vendor Configuration

Striing

Not applicable to Db2 for iSeries or LUW, HP NonStop, Sybase, or Teradata.

The output type is WAevent.

Sample Database Reader WAEvent

For the following row:

id  first_name  last_name  phone  street          city          state  zip_code
1   Deborah     Burks      NULL   9273 Thorne AV  Orchard Park  NY     14127

The WAEvent would be similar to:

WAEvent{
  data: [1,"Deborah","Burks",null,"9273 Thorne AV","Orchard Park","NY","14127"]
  metadata: {"TableName":"BikeStores.sales.customers","ColumnCount":8,
    "OperationName":"SELECT","OPERATION_TS":1681412863364}
  userdata: null
  before: null
  dataPresenceBitMap: "fwM="
  beforePresenceBitMap: "AAA="
  typeUUID: {"uuidstring":"01edda2e-77f7-9b21-83c2-8e859085da65"}
};

The operation name for Database Reader WAEvents is always SELECT.

DatabaseReader data type support and correspondence

The information in these tables also applies to Incremental Batch Reader.

For Db2 for iSeries or LUW

DB2 type

Striim type

BIGINT

java.lang.String

BINARY

java.lang.String

BLOB

java.lang.String

CHAR

java.lang.String

CLOB

java.lang.String

DATE

java.lang.String

DBCLOB

java.lang.String

DECFLOAT

java.lang.String

DECIMAL

java.lang.String

DOUBLE

java.lang.String

GRAPHIC

java.lang.String

INTEGER

java.lang.String

NUMERIC

java.lang.String

REAL

java.lang.String

SMALLINT

java.lang.String

TIME

java.lang.String

TIMESTAMP

java.lang.String

VARBINARY

java.lang.String

VARCHAR

java.lang.String

VARGRAPHIC

java.lang.String

XML

java.lang.String

For HP NonStop, Sybase, or Teradata:

JDBC column type

TQL type

notes

Types.ARRAY

java.lang.String

Types.BIGINT

java.lang.Long

Types.BIT

java.lang.Boolean

Types.CHAR

java.lang.String

Types.DATE

org.joda.time.LocalDate

Types.DECIMAL

java.lang.String

Types.DOUBLE

java.lang.Double

Types.FLOAT

java.lang.Double

Types.INTEGER

java.lang.Integer

Types.NUMERIC

java.lang.String

Types.REAL

java.lang.Float

Types.SMALLINT

java.lang.Short

Types.TIMESTAMP

org.joda.time.DateTime

Types.TINYINT

java.lang.Short

For MySQL, if the source tables contain columns of this type, append ?tinyInt1isBit=false to the connection URL (jdbc:mysql://<ip address>:<port>/<database name>?tinyInt1isBit=false).

Types.VARCHARCHAR

java.lang.String

other types

java.lang.String