https://pulumi.com logo
#general
Title
# general
r

rough-quill-46540

11/29/2023, 2:56 PM
Hi, is there any way to specify collation when creating a table in snowflake? The context is, I create the table like this:
Copy code
columns = [
    snowflake.TableColumnArgs(
        'MY_COLUMN',
        type="VARCHAR(100) COLLATE 'en-ci'",
    )]

self.tables[table_name] = snowflake.Table(
    'MY_TABLE',
    columns=columns,
    database=db_name,
    schema=schema_name)
And what I get in the db side is:
Copy code
CREATE TABLE "MY_DB"."SCHEMA"."MY_TABLE" ("MY_COLUMN" VARCHAR(100) COLLATE \\'en-ci\\' COMMENT '') 
 'DATA_RETENTION_TIME_IN_DAYS = 1 CHANGE_TRACKING = false';
So it tries to escape the single quotes around the collation which makes the table creation fail. Is there any way around this?