
Batch
Run a Vertica database batch-query.
Run a Vertica database batch-query.
Run a Vertica database batch-query.
type: "io.kestra.plugin.jdbc.vertica.Batch"Examples
Fetch rows from a table and bulk insert to another one.
id: vertica_batch_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.vertica.Query
url: jdbc:vertica://dev:56982/db
username: "{{ secret('VERTICA_USERNAME') }}"
password: "{{ secret('VERTICA_PASSWORD') }}"
sql: |
SELECT *
FROM xref
LIMIT 1500;
fetchType: FETCH
fetchType: STORE
- id: update
type: io.kestra.plugin.jdbc.vertica.Batch
from: "{{ outputs.query.uri }}"
url: jdbc:vertica://prod:56982/db
username: "{{ secret('VERTICA_USERNAME') }}"
password: "{{ secret('VERTICA_PASSWORD') }}"
sql: insert into xref values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
Fetch rows from a table and bulk insert to another one, without using sql query.
id: vertica_batch_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.vertica.Query
url: jdbc:vertica://dev:56982/db
username: vertica_user
password: vertica_passwd
sql: |
SELECT *
FROM xref
LIMIT 1500;
fetchType: FETCH
fetchType: STORE
- id: update
type: io.kestra.plugin.jdbc.vertica.Batch
from: "{{ outputs.query.uri }}"
url: jdbc:vertica://prod:56982/db
username: vertica_user
password: vertica_passwd
table: xrefProperties
from*Requiredstring
Source file URI
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
url*Requiredstring
The JDBC URL to connect to the database.
chunkintegerstring
1000The size of chunk for every bulk request.
columnsarray
The columns to be inserted.
If not provided, ? count need to match the from number of columns.
passwordstring
The database user's password.
sqlstring
Insert query to be executed.
The query must have as many question marks as the number of columns in the table. Example: 'INSERT INTO <table_name> VALUES( ? , ? , ? )' for 3 columns. In case you do not want all columns, you need to specify it in the query in the columns property Example: 'INSERT INTO <table_name> (id, name) VALUES( ? , ? )' for inserting data into 2 columns: 'id' and 'name'.
tablestring
The table from which column names will be retrieved.
This property specifies the table name which will be used to retrieve the columns for the inserted values.
You can use it instead of specifying manually the columns in the columns property. In this case, the sql property can also be omitted, an INSERT statement would be generated automatically.
timeZoneIdstring
The time zone id to use for date/time manipulation. Default value is the worker's default time zone id.
usernamestring
The database user.
Outputs
rowCountinteger
The rows count.
updatedCountinteger
The updated rows count.
Metrics
querycounter
queriesThe number of batch queries executed.
recordscounter
recordsThe number of records processed.
updatedcounter
recordsThe number of records updated.