CopyOut
CopyOut
yaml
type: "io.kestra.plugin.jdbc.postgresql.CopyOut"Examples
yaml
id: postgres_copy_out
namespace: company.team
tasks:
- id: copy_out
type: io.kestra.plugin.jdbc.postgresql.CopyOut
url: jdbc:postgresql://sample_postgres:5432/world
username: "{{ secret("POSTGRES_USERNAME") }}"
password: "{{ secret("POSTGRES_PASSWORD") }}"
format: CSV
sql: SELECT 1 AS int, 't'::bool AS bool UNION SELECT 2 AS int, 'f'::bool AS bool
header: true
delimiter: "\t"
yaml
id: export_from_postgres
namespace: company.team
tasks:
- id: export
type: io.kestra.plugin.jdbc.postgresql.CopyOut
url: jdbc:postgresql://sample_postgres:5432/world
username: "{{ secret("POSTGRES_USERNAME") }}"
password: "{{ secret("POSTGRES_PASSWORD") }}"
format: CSV
header: true
sql: SELECT * FROM country LIMIT 10
delimiter: ","
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.export.rowCount }}"
Properties
url *Requiredstring
columns array
SubTypestring
delimiter string
encoding string
escape string
forceNotNull array
SubTypestring
forceNull array
SubTypestring
forceQuote array
SubTypestring
format string
Default
TEXTPossible Values
TEXTCSVBINARYfreeze booleanstring
header booleanstring
nullString string
oids booleanstring
password string
quote string
sql string
ssl booleanstring
Default
falsesslCert string
sslKey string
sslKeyPassword string
sslMode string
Possible Values
DISABLEALLOWPREFERREQUIREVERIFY_CAVERIFY_FULLsslRootCert string
table string
username string
Outputs
rowCount integer
uri string
Format
uriMetrics
rows counter
Unit
rows