
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
columnsarray
SubTypestring
delimiterstring
encodingstring
escapestring
forceNotNullarray
SubTypestring
forceNullarray
SubTypestring
forceQuotearray
SubTypestring
formatstring
Default
TEXTPossible Values
TEXTCSVBINARYfreezebooleanstring
headerbooleanstring
nullStringstring
oidsbooleanstring
passwordstring
quotestring
sqlstring
sslbooleanstring
Default
falsesslCertstring
sslKeystring
sslKeyPasswordstring
sslModestring
Possible Values
DISABLEALLOWPREFERREQUIREVERIFY_CAVERIFY_FULLsslRootCertstring
tablestring
usernamestring
Outputs
rowCountinteger
uristring
Format
uriMetrics
rowscounter
Unit
rows