def _generate_table_ddl(*,
                        publish_as_symlink: bool,
                        publish_schema_name: str,
                        publish_table_name: str,
                        column_str: str,
                        partition_str: str,
                        location: str) -> str:
    """
      Generates CREATE ... TABLE  statement for Spark SQL.

    :param publish_as_symlink: Generate CREATE EXTERNAL TABLE with SymlinkTextInputFormat input format
    :param publish_schema_name: Hive schema to publish to.
    :param publish_table_name: Hive table.
    :param column_str: Column list, <col> <type>, comma-separated
    :param partition_str: Partition list, <col> <type>, comma-separated. Must not overlap with column list.
    :param location: Physical data location.
    :return:
    """
    if publish_as_symlink:
        return f"""
        CREATE EXTERNAL TABLE {publish_schema_name}.{publish_table_name} ({column_str})
        {partition_str}
        ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
        STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat'
        OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
        LOCATION '{location}/_symlink_format_manifest/'
        """

    return f"""
        CREATE TABLE {publish_schema_name}.{publish_table_name}
        USING delta 
        LOCATION '{location}' 
        """