keboola / ex-teradata

MIT License
0 stars 0 forks source link

Teradata Extractor

Keboola Connection Extractor for Teradata

Configuration

Options

The configuration requires a db node with the following properties:

There are 2 possible types of table extraction.

  1. A table defined by schema and tableName, this option can also include a columns list.
  2. A query which is the SQL SELECT statement to be executed to produce the result table.

The extraction has the following configuration options:

Example

Configuration with custom query:

{
    "parameters": {
        "db": {
            "host": "100.200.30.40",
            "user": "tduser",
            "#password": "tdpassword",
            "database": "tddatabase"
        },
        "name": "tablename",
        "query": "SELECT COUNT(*) c, column1 FROM tddatabase.tablename GROUP BY column1",
        "outputTable": "out.c-main.tablename",
        "incremental": false,
        "primaryKey": null
    }
}

Configuration with defined table:

{
    "parameters": {
        "db": {
            "host": "100.200.30.40",
            "user": "tduser",
            "#password": "tdpassword",
            "database": "tddatabase"
        },
        "name": "test_1",
        "outputTable": "out.c-main.test-1",
        "incremental": false,
        "primaryKey": null,
        "table": {
            "schema": "tddatabase",
            "tableName": "test_1"
        }
    }
}

Configuration with defined columns:

{
    "parameters": {
        "db": {
            "host": "100.200.30.40",
            "user": "tduser",
            "#password": "tdpassword",
            "database": "tddatabase"
        },
        "name": "test_1",
        "outputTable": "out.c-main.test-1",
        "incremental": false,
        "primaryKey": null,
        "table": {
            "schema": "tddatabase",
            "tableName": "test_1"
        },
        "columns": [
            "column1"
        ]
    }
}

Development

Clone this repository and init the workspace with following command:

git clone https://github.com/keboola/ex-teradata
cd ex-teradata
docker-compose build
docker-compose run --rm dev composer install --no-scripts

Generate AWS credentials for drivers download:

docker run --rm -i \
--volume $HOME/.aws/:/root/.aws/ \
quay.io/keboola/aws-cli:latest sts get-session-token

Create .env file:

TERADATA_HOST=100.200.30.40
TERADATA_PORT=1025
TERADATA_USERNAME=user
TERADATA_PASSWORD=password
TERADATA_DATABASE=database_name

# Drivers download
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_SESSION_TOKEN=

Build the image:

docker-compose build dev

Tools

Integration

For information about deployment and integration with KBC, please refer to the deployment section of developers documentation

License

MIT licensed, see LICENSE file.