The target-clickhouse loader sends data into Clickhouse after it was pulled from a source using an extractor
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the target-clickhouse loader to your
project using
:meltano add
-
Configure the target-clickhouse
settings using
:meltano config
meltano add loader target-clickhouse
meltano config target-clickhouse set --interactive
Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities
The current capabilities for
target-clickhouse
may have been automatically set when originally added to the Hub. Please review the
capabilities when using this loader. If you find they are out of date, please
consider updating them by making a pull request to the YAML file that defines the
capabilities for this loader.
This plugin has the following capabilities:
- about
- hard-delete
- schema-flattening
- stream-maps
You can
override these capabilities or specify additional ones
in your meltano.yml
by adding the capabilities
key.
Settings
The
target-clickhouse
settings that are known to Meltano are documented below. To quickly
find the setting you're looking for, click on any setting name from the list:
batch_size_rows
cluster_name
database
driver
engine_type
host
optimize_after
password
port
replica_name
secure
sqlalchemy_url
table_name
table_path
username
verify
order_by_keys
You can also list these settings using
with the meltano config
list
subcommand:
meltano config target-clickhouse list
You can
override these settings or specify additional ones
in your meltano.yml
by adding the settings
key.
Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.
Batch Size Rows (batch_size_rows)
-
Environment variable:
TARGET_CLICKHOUSE_BATCH_SIZE_ROWS
Maximum number of rows in each batch.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set batch_size_rows [value]
Cluster Name (cluster_name)
-
Environment variable:
TARGET_CLICKHOUSE_CLUSTER_NAME
The cluster to create tables in. This is passed as the clickhouse_cluster
argument when creating a table. documentation can be found here.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set cluster_name [value]
Database (database)
-
Environment variable:
TARGET_CLICKHOUSE_DATABASE
-
Default Value:
default
Database name
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set database [value]
Driver (driver)
-
Environment variable:
TARGET_CLICKHOUSE_DRIVER
-
Default Value:
http
Driver type
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set driver [value]
Engine Type (engine_type)
-
Environment variable:
TARGET_CLICKHOUSE_ENGINE_TYPE
The engine type to use for the table.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set engine_type [value]
Host (host)
-
Environment variable:
TARGET_CLICKHOUSE_HOST
-
Default Value:
localhost
Database host
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set host [value]
Optimize After (optimize_after)
-
Environment variable:
TARGET_CLICKHOUSE_OPTIMIZE_AFTER
-
Default Value:
false
Run 'OPTIMIZE TABLE' after data insert. Useful whentable engine removes duplicate rows.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set optimize_after [value]
Password (password)
-
Environment variable:
TARGET_CLICKHOUSE_PASSWORD
Username password
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set password [value]
Port (port)
-
Environment variable:
TARGET_CLICKHOUSE_PORT
-
Default Value:
8123
Database connection port
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set port [value]
Replica Name (replica_name)
-
Environment variable:
TARGET_CLICKHOUSE_REPLICA_NAME
The replica_name
for replicated tables. This is required when using any of the replication engines.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set replica_name [value]
Secure (secure)
-
Environment variable:
TARGET_CLICKHOUSE_SECURE
-
Default Value:
false
Should the connection be secure
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set secure [value]
Sqlalchemy URL (sqlalchemy_url)
-
Environment variable:
TARGET_CLICKHOUSE_SQLALCHEMY_URL
The SQLAlchemy connection string for the ClickHouse database. Used if set, otherwise separate settings are used
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set sqlalchemy_url [value]
Table Name (table_name)
-
Environment variable:
TARGET_CLICKHOUSE_TABLE_NAME
The name of the table to write to. Defaults to stream name.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set table_name [value]
Table Path (table_path)
-
Environment variable:
TARGET_CLICKHOUSE_TABLE_PATH
The table path for replicated tables. This is required when using any of the replication engines. Check out the documentation for more information. Use $table_name
to substitute the table name.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set table_path [value]
Username (username)
-
Environment variable:
TARGET_CLICKHOUSE_USERNAME
-
Default Value:
default
Database user
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set username [value]
Verify (verify)
-
Environment variable:
TARGET_CLICKHOUSE_VERIFY
-
Default Value:
true
Should secure connection need to verify SSL/TLS
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set verify [value]
Order By Keys (order_by_keys)
-
Environment variable:
TARGET_CLICKHOUSE_ORDER_BY_KEYS
The list of columns to order by when loading data into the destination.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set order_by_keys [value]
Expand To Show SDK Settings
Add Record Metadata (add_record_metadata)
-
Environment variable:
TARGET_CLICKHOUSE_ADD_RECORD_METADATA
Add metadata to records.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set add_record_metadata [value]
Default Target Schema (default_target_schema)
-
Environment variable:
TARGET_CLICKHOUSE_DEFAULT_TARGET_SCHEMA
The default target database schema name to use for all streams.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set default_target_schema [value]
Faker Config Locale (faker_config.locale)
-
Environment variable:
TARGET_CLICKHOUSE_FAKER_CONFIG_LOCALE
One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set faker_config locale [value]
Faker Config Seed (faker_config.seed)
-
Environment variable:
TARGET_CLICKHOUSE_FAKER_CONFIG_SEED
Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set faker_config seed [value]
Flattening Enabled (flattening_enabled)
-
Environment variable:
TARGET_CLICKHOUSE_FLATTENING_ENABLED
'True' to enable schema flattening and automatically expand nested properties.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set flattening_enabled [value]
Flattening Max Depth (flattening_max_depth)
-
Environment variable:
TARGET_CLICKHOUSE_FLATTENING_MAX_DEPTH
The max depth to flatten schemas.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set flattening_max_depth [value]
Hard Delete (hard_delete)
-
Environment variable:
TARGET_CLICKHOUSE_HARD_DELETE
-
Default Value:
false
Hard delete records.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set hard_delete [value]
Load Method (load_method)
-
Environment variable:
TARGET_CLICKHOUSE_LOAD_METHOD
-
Default Value:
append-only
The method to use when loading data into the destination. append-only
will always write all input records whether that records already exists or not. upsert
will update existing records and insert new records. overwrite
will delete all existing records and insert all input records.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set load_method [value]
Stream Map Config (stream_map_config)
-
Environment variable:
TARGET_CLICKHOUSE_STREAM_MAP_CONFIG
User-defined config values to be used within map expressions.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set stream_map_config [value]
Stream Maps (stream_maps)
-
Environment variable:
TARGET_CLICKHOUSE_STREAM_MAPS
Config object for stream maps capability. For more information check out Stream Maps.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set stream_maps [value]
Validate Records (validate_records)
-
Environment variable:
TARGET_CLICKHOUSE_VALIDATE_RECORDS
-
Default Value:
true
Whether to validate the schema of the incoming streams.
Configure this setting directly using the following Meltano command:
meltano config target-clickhouse set validate_records [value]
Something missing?
This page is generated from a YAML file that you can contribute changes to.
Edit it on GitHub!Looking for help?
#plugins-general
channel.