Search code examples
postgresqlgoogle-cloud-platformgoogle-bigquerycdcgoogle-datastream

Workaround for Enum data types for PostgreSQL Google Cloud Datastream


I was surprised to find that Cloud Datastream does not support enum data types in source if replicating from PostgreSQL.

Datastream doesn't support replication of columns of the enumerated (ENUM) data type.

As we have quite a few fields created that way, that is not a viable option for us. Is any good workaround for this limitation?


Solution

  • From google issue tracker:

    A workaround is to create a generated column which is of type text. DataStream will then sync the text column automatically and happily.

    Also:

    we're looking into adding support for ENUMs as part of our GA launch of the PostgreSQL source