airflow.providers.common.sql.dialects.dialect¶
Attributes¶
Classes¶
Generic dialect implementation. |
Module Contents¶
- class airflow.providers.common.sql.dialects.dialect.Dialect(hook, **kwargs)[source]¶
Bases:
airflow.utils.log.logging_mixin.LoggingMixin
Generic dialect implementation.
- escape_word(word)[source]¶
Escape the word if necessary.
If the word is a reserved word or contains special characters or if the
escape_column_names
property is set to True in connection extra field, then the given word will be escaped.
- unescape_word(word)[source]¶
Remove escape characters from each part of a dotted identifier (e.g., schema.table).
- run(sql, autocommit=False, parameters=None, handler=None, split_statements=False, return_last=True)[source]¶
- generate_insert_sql(table, values, target_fields, **kwargs)[source]¶
Generate the INSERT 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
- Returns:
The generated INSERT SQL statement
- Return type:
- 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
- Returns:
The generated REPLACE SQL statement
- Return type: