https://linen.dev logo
#ask-community-for-troubleshooting
Title
# ask-community-for-troubleshooting
p

Pavel B

01/12/2022, 10:24 AM
Hey guys! Nice to e-meet you! I was wondering if someone running Postgres->Redshift CDC successfully and could answer few potentially silly questions? 🙂 We're looking for a working solution to copy our prod database to BI, tried different tools (all of those we checked had some shortcomings) and now landed to airbyte, but I am a bit confused that it seems a lot of data types are not fully supported/converted to varchar? (https://docs.airbyte.com/integrations/sources/postgres#data-type-mapping) It sounds like it's not a very rare case to copy PG to Redshift, so I'm curious if it's docs which are obsolete (cause this PR seems to be adding more types? https://github.com/airbytehq/airbyte/pull/7339) or there is some proven way to get more types into Redshift (some dbt scripts?) Thanks in advance! 🙂
1
u

[DEPRECATED] Augustin Lafanechere

01/12/2022, 2:57 PM
Hi @Pavel B the latest improvements on postgres type handling was done in this PR, which corresponds to the doc you linked. In Airbyte, all sources type are converted to json schema primitive types: • string, • number • object • integer • array • boolean • null Raw data is indeed stored as JSON in your destination raw tables. Casting operations of these type to more destination specific type is done during the transformation step with dbt. The transformation we are operating is basic normalization, in this transformation date formats are casted to destination native type. At the moment no other specific types are handled because we want to make basic normalization as generic as possible for all destinations. You are still free to use custom transformation in your syncs by using your own DBT project with the casting you want. Could you let us know which redshift type you're interested in? (@Chris (deprecated profile) + @Liren Tu do you want to add anything?)
p

Pavel B

01/12/2022, 3:57 PM
Thanks for the reply, @[DEPRECATED] Augustin Lafanechere! This is helpful! Is there any example for dbt transformations related to data types? I am new to this tool, so example would be helpful 🙂 Thank you!