dlt.destinations.impl.postgres.factory
postgres Objects
class postgres(Destination[PostgresClientConfiguration, "PostgresClient"])
__init__
def __init__(credentials: Union[PostgresCredentials, Dict[str, Any],
                                str] = None,
             create_indexes: bool = True,
             csv_format: Optional[CsvFormatConfiguration] = None,
             destination_name: str = None,
             environment: str = None,
             **kwargs: Any) -> None
Configure the Postgres destination to use in a pipeline.
All arguments provided here supersede other configuration sources such as environment variables and dlt config files.
Arguments:
- credentialsUnion[PostgresCredentials, Dict[str, Any], str], optional - Credentials to connect to the postgres database. Can be an instance of- PostgresCredentialsor a connection string in the format- postgres://user:password@host:port/database
- create_indexesbool, optional - Should unique indexes be created
- csv_formatOptional[CsvFormatConfiguration] - Formatting options for csv file format
- destination_namestr, optional - Name of the destination, can be used in config section to differentiate between multiple of the same type
- environmentstr, optional - Environment of the destination
- **kwargsAny - Additional arguments passed to the destination config