{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/cloudquery/cloudquery/plugins/destination/postgresql/client/spec/spec", "$ref": "#/$defs/Spec", "$defs": { "Duration": { "type": "string", "pattern": "^[-+]?([0-9]*(\\.[0-9]*)?[a-z]+)+$", "title": "CloudQuery configtype.Duration" }, "LogLevel": { "type": "string", "enum": [ "", "none", "error", "warn", "info", "debug", "trace" ], "title": "PostgreSQL driver log level", "description": "Defines what [`pgx`](https://github.com/jackc/pgx) call events should be logged.", "default": "error" }, "Spec": { "properties": { "connection_string": { "type": "string", "minLength": 1, "description": "Connection string to connect to the database. This can be a URL or a DSN, for example:\n\n- `\"postgres://user:pass@localhost:5432/mydb?sslmode=prefer\"` connect with tcp and prefer TLS\n- `\"postgres://user:pass@localhost:5432/mydb?sslmode=disable\u0026search_path=myschema\"` connect with tcp, disable TLS and use a custom schema\n- `\"user=user password=pass host=localhost port=5432 dbname=mydb sslmode=disable\"` DSN format", "examples": [ "${POSTGRESQL_CONNECTION_STRING}" ] }, "pgx_log_level": { "$ref": "#/$defs/LogLevel", "description": "Available: `error`, `warn`, `info`, `debug`, `trace`.\nDefines what [`pgx`](https://github.com/jackc/pgx) call events should be logged." }, "batch_size": { "type": "integer", "minimum": 1, "description": "Maximum number of items that may be grouped together to be written in a single write.", "default": 10000 }, "batch_size_bytes": { "type": "integer", "minimum": 1, "description": "Maximum size of items that may be grouped together to be written in a single write.", "default": 100000000 }, "batch_timeout": { "$ref": "#/$defs/Duration", "description": "Maximum interval between batch writes.", "default": "60s" }, "create_performance_indexes": { "type": "boolean", "description": "Option to create specific indexes to improve deletion performance", "default": false } }, "additionalProperties": false, "type": "object", "required": [ "connection_string" ] } } }