airflow.providers.postgres.dialects.postgres¶
Classes¶
Postgres dialect implementation. |
Module Contents¶
- class airflow.providers.postgres.dialects.postgres.PostgresDialect(hook, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.dialects.dialect.Dialect
Postgres dialect implementation.
- generate_replace_sql(table, values, target_fields, **kwargs)[source]¶
Generate the REPLACE SQL statement.
- Parameters:
table – Name of the target table
values – The row to insert into the table
target_fields – The names of the columns to fill in the table
replace – Whether to replace instead of insert
replace_index – the column or list of column names to act as index for the ON CONFLICT clause
- Returns:
The generated INSERT or REPLACE SQL statement
- Return type: