Destination data types all varchars

  • Is this your first time deploying Airbyte?: Yes
  • OS Version / Instance: Windows
  • Memory / Disk: you can use something like 4Gb / 1 Tb
  • Deployment: Docker
  • Airbyte Version: * 0.39.39-alpha
  • Source name/version: PostGres
  • Destination name/version: Snowflake
  • Step: The issue is happening during sync,
  • Description: Data types for source columns not replicating in destination tables. All of the columns are being cast to a varchar. Also, all varchars are not keeping the original max value. For example, in the source there is a varchar(50) which is being rendered as a varchar(16777216), which is Snowflake’s default max value.

Any help would be appreciated, and please let me know if you need more information.

Thanks

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

What version of Postgres SQL are you using?
Can you share a screenshoot of the replication tab with the catalog? (see example below)
Can you share a sync log? Which shows the catalog data type converted too.

Hello, apologize for the late reply. To answer your questions:

-Postgres version is PostgreSQL 12.12 on x86_64-pc-linux-gnu
I have also attached a copy of my most recent sync log as well as a screenshot of the replication tab.
logs-291.txt (389.3 KB)

Thanks,
Casey Douthitt

One example from your logs:

2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column address_type_id (type int8[19]) -> JsonSchemaType({type=number})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column country (type bpchar[2]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column subdivision (type varchar[50]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column city (type varchar[500]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column street1 (type varchar[500]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column street2 (type varchar[500]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column postal_code (type varchar[100]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column latitude (type float8[17]) -> JsonSchemaType({type=number})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column longitude (type float8[17]) -> JsonSchemaType({type=number})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column name (type varchar[125]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column attention (type varchar[500]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column is_primary (type bpchar[1]) -> JsonSchemaType({type=string})2022-11-27 11:07:47 e[44msourcee[0m > 2022-11-27 11:07:47 e[32mINFOe[m i.a.i.s.j.AbstractJdbcSource(lambda$discoverInternal$5):145 - Table addresses column needs_geocode (type bool[1]) -> JsonSchemaType({type=boolean})

It doesn’t look all the columns are mapped to string. Can you expand the instreg_s stream to see what data types Airbyte is reading?

Hello,

I was able to fix the problem of of having the wrong data types in the destination. The only thing left is to have the varchar max values transfer over from postgres into snowflake. For example, the varchars are listed as varchar(500) in Postgres, and are listed as varchar(16777216). Is there a way to have the varchars the same size after synching?

image
image

Thanks,
Casey Douthitt