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
SubType string
delimiter string
encoding string
escape string
forceNotNull array
SubType string
forceNull array
SubType string
forceQuote array
SubType string
format string
Default
TEXT
Possible Values
TEXT
CSV
BINARY
freeze booleanstring
header booleanstring
nullString string
oids booleanstring
password string
quote string
sql string
ssl booleanstring
Default
false
sslCert string
sslKey string
sslKeyPassword string
sslMode string
Possible Values
DISABLE
ALLOW
PREFER
REQUIRE
VERIFY_CA
VERIFY_FULL
sslRootCert string
table string
username string
Outputs
rowCount integer
uri string
Format
uri