dlt.common.data_writers.escape
escape_snowflake_literal
def escape_snowflake_literal(v: Any) -> Any
Escape string literals for Snowflake using standard SQL escaping.
Snowflake uses '' to escape single quotes (not backslash escaping).
format_datetime_value
def format_datetime_value(v: datetime,
precision: int = 6,
no_tz: bool = False) -> str
ISO datetime string at given precision, optionally UTC-naive.
format_datetime_literal
def format_datetime_literal(v: datetime,
precision: int = 6,
no_tz: bool = False) -> str
Quoted SQL datetime literal.
format_bigquery_datetime_literal
def format_bigquery_datetime_literal(v: pendulum.DateTime,
precision: int = 6,
no_tz: bool = False) -> str
Returns BigQuery-adjusted datetime literal by prefixing required TIMESTAMP indicator.
Also works for Presto-based engines.
format_clickhouse_datetime_literal
def format_clickhouse_datetime_literal(v: pendulum.DateTime,
precision: int = 6,
no_tz: bool = False) -> str
Returns clickhouse compatibel function