Load Data from CData JDBC Drivers
Ingest from a variety of sources using CData JDBC drivers
Note
This documentation is for a prior release of Kinetica. For the latest documentation, click here.
Ingest from a variety of sources using CData JDBC drivers
Loading data from a CData data source can be done in two easy steps:
Kinetica provides pre-packaged, third-party JDBC drivers, out of the box, that allow you to connect to varied and popular data sources. While they are similar to Kinetica's generic JDBC driver data source, they differ in two important ways:
To illustrate data ingress from a CData JDBC data source, let's look at an example that uses PostgreSQL. If you would like to follow along with the examples in this article, you will need:
The JDBC connection string parameters can be found on CData's PostgreSQL JDBC Driver documentation page. CData connection strings, specified in the LOCATION statement, use the following format:
jdbc:<driver_name>:<param>=<value>;[...]
Note
Like Kinetica's JDBC data source, you do not need to first create a credential. Authentication parameters can be passed directly into the connection string of the data source at the time of creation.
For this example, we will use the following connection parameters, but you may need others for your use case:
|
|
To initiate the ingress of data from the PostgreSQL instance, issue the following command. The REMOTE QUERY will be executed on the remote data source and it defines the data Kinetica will receive in return.
|
|
If you only want to return data that satisfies a condition, a WHERE clause can be used to filter the data coming from the data source.
|
|
The following are some common options used when loading data. For the full list of options, see LOAD INTO. For copy/paste examples of many of the options, see Loading Data.
Kinetica has two different error handling modes for dealing with erroneous data. To halt ingestion after a bad record is found, use the ABORT mode. To skip erroneous records and continue the ingest, use the SKIP mode.
To inspect erroneous records, you may use the BAD RECORD TABLE NAME option. All bad records encountered will be stored there for review. The bad records table is limited to 10,000 records by default and may be overridden using the BAD RECORD TABLE LIMIT option.
|
|
|
|
In same cases, you may only want to store certain columns from your source data. You can simply list the columns you want to load in your REMOTE QUERY statement.
|
|