Info |
---|
The Multiple Database Tables batch source plugin is available in the Hub. |
Plugin version: 1.3.1
Reads from multiple tables within a database using JDBC. This source is often used with the Google Cloud Storage Multi Files Sink and Google BigQuery Multi Table Sink.
The source outputs a record for each row in the tables it reads, with each record containing an additional field that holds the name of the table the record came from. In addition, for each table it reads, this plugin sets pipeline arguments where the key is ‘multisinkmultisink.[tablename]
’ and the value is the schema of the table. This makes it work with the Google Cloud Storage Multi Files Sink and Google BigQuery Multi Table Sink.
...
Property | Macro Enabled? | Description |
---|---|---|
Reference Name | No | Required. Name used to uniquely identify this source for lineage, annotating metadata, etc. |
JDBC Connection String | Yes | Required. The JDBC connection string to the database. For example: jdbc:mysql://HOST/DATABASE. |
JDBC Plugin Name | No | Optional. The name of the JDBC plugin to use. |
Database User Name | Yes | Optional. The username to use when connecting to the database. |
Database User Password | Yes | Optional. The password to use when connecting to the database. |
Data Selection Mode | Yes | The operation mode for this plugin. Select one of the following:
Depending on the selected Data Selection Mode, the properties listed in the rest of the table will be available. |
Schema Name Pattern | Yes | Optional. A pattern that defines which schemas should be used to list the tables. Any schema whose name matches the pattern will read. If not specified, all schema will be read. Pattern syntax is specific to the type of database that is being connected to. |
Table Name Pattern | Yes | Optional. A pattern that defines which tables should be read from. Any table whose name matches the pattern will read. If not specified, all tables will be read. Pattern syntax is specific to the type of database that is being connected to. |
Where Clause | Yes | Optional. Filters which records needs to be consumed from each table: i.e. |
Allow List of Table Names | Yes | Optional. Used in conjunction with Table Name Pattern, this configuration specifies tables to be read. If no value is specified in the white list, all tables matching the Table Name Pattern will be read. By default, reads all tables matching the Table Name Pattern. |
Block List of Table Names | Yes | Optional. Used in conjunction with Table Name Pattern, this configuration specifies the tables to be skipped. By default, the black list is empty which means no tables will be skipped. |
SQL Statements | Yes | Optional. List of SQL statements to execute. Each statement will be handled as a different partition. When submitting this statements using the API, use a semicolon |
Table Aliases | Yes | Optional. List of aliases to use for the datasets generated by the supplied SQL statements. If supplied, the Table Alias for each SQL statement will be used as the Table Name value for each record. The SQL statements will be matched to a Table Alias based on the order in which they appear on the list. This option is only displayed when the Data Selection Mode is SQL Statements. |
Table Name Field | No | Optional. The name of the field that holds the table name. Must not be the name of any table column that will be read. Default is ‘tablename’. |
Enable Auto Commit | Yes | Optional. Whether to enable auto commit for queries run by this source. This setting should only matter if you are using a JDBC driver that does not support a false value for auto commit, or a driver that does not support the commit call. For example, the Hive JDBC driver will throw an exception whenever a commit is called. For drivers like that, this should be set to true. Defaults to false. |
Splits Per Table | Yes | Optional. The number of splits per table. This option is only displayed when the Data Selection Mode is either Allow List ot Tables or Block List of Tables. Default is 1. |
Query Timeout (Seconds) | No | Optional. The query timeout in seconds. |
Transaction Isolation Level | Yes | Optional. The transaction isolation level for queries run by this sink. Defaults to TRANSACTION_SERIALIZABLE. See java.sql.Connection#setTransactionIsolation for more details. The Phoenix jdbc . For more information, see https://docs.oracle.com/javadb/10.8.3.0/ref/rrefjavcsti.html. The Phoenix JDBC driver will throw an exception if the Phoenix database does not have transactions enabled and this setting is set to true. For drivers like that, this should be set to Defaults to |
Error Handling Mode | No | Optional. How to handle error handling. Default is Fail pipeline. |
...