Skip to main content

Community

Transformations: Postgres custom objectid datatype transformation

Answered

Please sign in to leave a comment.

Comments

2 comments

  • Official comment

    Hey Isaac, thanks for your question here. Could you elaborate on the custom data type you are using? Are these Postgres User-defined Types (https://www.postgresql.org/docs/13/xtypes.html) that have various subtypes within it?

    If so, how would you want this data to land in your destination? Would it be a JSON type with each subtype as a property? Or would you expect each subtype to be parsed out into its own column?

    Please let me know! I will be sure to discuss this with our team.

    Thanks for your response Kevin! These columns are not actually custom data types, but custom domains. I apologize for the confusion -- was conflating what's in the source table with the Fivetran connector error logs.

    The table in question doesn't use anything special to create the domain:

    `create domain objectid as text check ( value ~ '^[0-9a-f]{24}$' );`
     

    We'd expect them to be cast to a text or varchar at the Fivetran sync stage. That's how it loads for our MongoDB connector anyway and has worked fine.