Vertica output plugin for Embulk
Overview
- Plugin type: output
- Resume supported: no
- Cleanup supported: no
- Dynamic table creating: yes
Configuration
- host: hostname (string, default: localhost)
- port: port number (integer, default: 5433)
- username: username (string, required)
- password: password (string, default: '')
- database: database name (string, default: vdb)
- schema: schema name (string, default: public)
- table: table name (string, required)
- mode: "insert", or "replace". See bellow. (string, default: insert)
- copy_mode: specifies how data is loaded into the database. (
AUTO,DIRECT, orTRICKLE. default: AUTO) See vertica documents for details. - abort_on_error: Stops the COPY command if a row is rejected and rolls back the command. No data is loaded. (bool, default: false)
- column_options: advanced: a key-value pairs where key is a column name and value is options for the column.
- type: type of a column when this plugin creates new tables such as
VARCHAR(255),INTEGER NOT NULL UNIQUE. This is used on creating intermediate tables (insert and truncate_insert modes) and on creating a new target table. (string, default: depends on input column type, see below) INT(same withBIGINTin vertica) forlongBOOLEANforbooleanFLOAT(same withDOUBLE PRECISIONin vertica) fordoubleVARCHARforstringTIMESTAMPfortimestamp
- type: type of a column when this plugin creates new tables such as
Modes
- insert:
- Behavior: This mode copys rows to some intermediate tables first. If all those tasks run correctly, runs INSERT INTO
SELECT * FROM - Transactional: Yes if
abort_on_erroroption is used
- Behavior: This mode copys rows to some intermediate tables first. If all those tasks run correctly, runs INSERT INTO
- replace:
- Behavior: Same with insert mode excepting that it drop the target table first.
- Transactional: Yes if
abort_on_erroroption is used
Example
out:
type: vertica
host: 127.0.0.1
username: dbadmin
password: xxxxxxx
database: vdb
schema: sandbox
table: embulk_test
copy_mode: DIRECT
abort_on_error: true
column_options:
id: {type: INT}
name: {type: VARCHAR(255)}
Development
Run example:
$ bundle install
$ bundle exec embulk run -l debug example.yml
Release gem:
$ bundle exec rake release