Ingest DB2 Table
DB2 Consumer is based on datahub-flowagent and uses Data Services as an execution engine.
DB2 Table Consumer
Table Consumer takes in the schema.tablename as input and it will read the table from the source piece-wise (100 rows per call), and load to the next operator in line.
Prerequisites
Configuration using DB2 ODBC CLI Driver
-
Download DB2 ODBC CLI Driver here
. Select
IBM Data Server Driver for ODBC and CLI (CLI
Driver), log in to your IBM account, and then select
the Linux platform (only Linux).
-
Open Data Hub Launchpad > System Management > Files tab and create a folder in your Tenant Workspace named "flowagent".
-
Right-click the "flowagent" directory, select Import File and import the DB2 ODBC CLI Driver tar.gz file.
-
Inside the newly created folder, create a new file named "tp-clients-env.sh" and put the following environment variables in there:
export DB2_CLI_DRIVER=/vrep/flowagent/clidriver/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DB2_CLI_DRIVER
- IMPORTANT: If the Flowagent application is already started, you must recreate it in order for the changes to be applied.
Components
-
Defining DB2 Connection:
db2sqlconsumer1: provides DB2 consumer connection information.
DB2 default port is 50000.
If no port is provided in connection definition, the default value will be assigned.
- Loader definition:
flowagentfileproducer1: Data Services requires a loader, such as CSV Loader, to load to Vflow operators.
