Workaround for Enum data types for PostgreSQL Google Cloud Datastream

681 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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