Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[destination-snowflake] java.lang.RuntimeException: Unable to deserialize PartialAirbyteMessage. #37621

Open
1 task done
marcraminv opened this issue Apr 26, 2024 · 10 comments
Assignees
Labels
area/connectors Connector related issues community connectors/destination/snowflake team/destinations Destinations team's backlog type/bug Something isn't working

Comments

@marcraminv
Copy link

marcraminv commented Apr 26, 2024

Connector Name

destination-snowflake

Connector Version

3.6.6

What step the error happened?

During the sync

Relevant information

Environment:

Source: airbyte/source-postgres:3.3.27
Destination: airbyte/destination-snowflake:3.6.6 (upgraded from 3.4.10)
Platform: 0.56.0 (upgraded from 0.50.33)

Issue:

When attempting to ingest all fields, the process fails with the following error:

2024-04-26 08:27:19 destination > WARN main i.a.c.j.Jsons(handleDeserThrowable):440 Failed to deserialize json due to class com.fasterxml.jackson.databind.JsonMappingException
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:402)
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:361)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1853)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
        at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
        at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3772)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3740)
        at io.airbyte.commons.json.Jsons.tryDeserializeExact(Jsons.java:146)
        at io.airbyte.cdk.integrations.destination.async.deser.DeserializationUtil.deserializeAirbyteMessage(DeserializationUtil.kt:31)
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.accept(AsyncStreamConsumer.kt:204)
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.accept(AsyncStreamConsumer.kt:46)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.consumeWriteStream(IntegrationRunner.java:309)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.consumeWriteStream(IntegrationRunner.java:289)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:190)
        at io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.java:125)
        at io.airbyte.cdk.integrations.base.adaptive.AdaptiveDestinationRunner$Runner.run(AdaptiveDestinationRunner.java:88)
        at io.airbyte.integrations.destination.snowflake.SnowflakeDestinationRunner.main(SnowflakeDestinationRunner.java:20)

Additional message

2024-04-26 08:28:14 destination > ERROR main i.a.c.i.b.AirbyteExceptionHandler(uncaughtException):64 Something went wrong in the connector. See the logs for more details. java.lang.RuntimeException: Unable to deserialize PartialAirbyteMessage.
        at io.airbyte.cdk.integrations.destination.async.deser.DeserializationUtil.deserializeAirbyteMessage$lambda$0(DeserializationUtil.kt:32) ~[airbyte-cdk-core-0.27.7.jar:?]
        at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
        at io.airbyte.cdk.integrations.destination.async.deser.DeserializationUtil.deserializeAirbyteMessage(DeserializationUtil.kt:32) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.accept(AsyncStreamConsumer.kt:204) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.accept(AsyncStreamConsumer.kt:46) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.consumeWriteStream(IntegrationRunner.java:309) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.consumeWriteStream(IntegrationRunner.java:289) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:190) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.java:125) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.cdk.integrations.base.adaptive.AdaptiveDestinationRunner$Runner.run(AdaptiveDestinationRunner.java:88) ~[airbyte-cdk-core-0.27.7.jar:?]
        at io.airbyte.integrations.destination.snowflake.SnowflakeDestinationRunner.main(SnowflakeDestinationRunner.java:20) ~[io.airbyte.airbyte-integrations.connectors-destination-snowflake.jar:?]

Observation:

The process succeeds when one of the large-sized fields is discarded. So, we assume the issue is with the column length, but it is an assumption. Has something on the snowflake connector been changed?

Request:

I'm looking for help obtaining more detailed logs for debugging purposes. To facilitate debugging, it would be helpful to identify the affected rows or similar information. The lack of detailed error messages makes it challenging to pinpoint the exact cause of failure.

Log information

attempt_1.txt
attempt_2.txt
attempt_3.txt
attempt_4.txt
attempt_5.txt

Relevant log output

No response

Contribute

  • Yes, I want to contribute
@marcosmarxm
Copy link
Member

Is this a new sync or it was workign before?

@marcraminv
Copy link
Author

When we tested the sync in the past with the config 👇, it worked.

platform version destination
airbyte 0.50.33 airbyte/destination-snowflake:3.4.10

Then we upgraded to:

platform version destination
airbyte 0.56.0 airbyte/destination-snowflake: 3.6.6

Could something change on the connector? Or is it related to the message size?

@sluo2024
Copy link

sluo2024 commented May 7, 2024

hello, I encountered the same error while syncing mysql to snowflake, the error message is
at java.base/java.lang.Thread.run(Thread.java:1583)
2024-05-06 21:15:48 destination > ERROR main i.a.c.i.b.AirbyteExceptionHandler(uncaughtException):64 Something went wrong in the connector. See the logs for more details. java.lang.RuntimeException: Unable to deserialize PartialAirbyteMessage.
at io.airbyte.cdk.integrations.destination.async.deser.DeserializationUtil.deserializeAirbyteMessage$lambda$0(DeserializationUtil.kt:32) ~[airbyte-cdk-core-0.27.7.jar:?]
at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?].

Is there any workaround for this? can we get older version of the connector to try?

Thanks,

@dfi69
Copy link

dfi69 commented May 10, 2024

We're encountering the same issue with the following versions:

Platform Version Destination Version
airbyte 0.59.0 airbyte/destination-snowflake: 3.7.4

2024-05-10 10:55:12 platform > failures: [ { "failureOrigin" : "destination", "failureType" : "system_error", "internalMessage" : "java.lang.RuntimeException: Unable to deserialize PartialAirbyteMessage.", "externalMessage" : "Something went wrong in the connector. See the logs for more details.", "metadata" : { "attemptNumber" : 4, "jobId" : 13, "from_trace_message" : true, "connector_command" : "write" },

@marcosmarxm
Copy link
Member

I raised this to the destination team. Hope to get an updated about what is causing this errors.
@marcraminv if you return to the previous version it works?

@marcraminv
Copy link
Author

We haven't tried because we migrated everything to the last version on the Platform, but we tried to downgrade the destination and are still having the same issue.

@marcosmarxm
Copy link
Member

Hello everyone! 👋 Please upgrade to the latest version of Destination Snowflake 3.8.0. This version uses the most recent Airbyte Destination CDK, which should resolve the issue you're currently facing. Let me know if the problem is solved after the upgrade. Thanks!

@marcraminv
Copy link
Author

marcraminv commented May 14, 2024

Hey @marcosmarxm, We upgraded to:

platform version destination
airbyte 0.59.1 airbyte/destination-snowflake:3.8.0

The problem is still there:

attempt_1.txt

attempt_2.txt

attempt_3.txt

attempt_4.txt

attempt_5.txt

@evantahler
Copy link
Contributor

Can you also confirm that you are using the latest version of the Airbyte platform? we changed how we handle large records recently

@evantahler evantahler self-assigned this May 14, 2024
@marcraminv
Copy link
Author

Hey, @evantahler, I can confirm that we upgraded to the last platform version, 0.59.1.

I can provide more context and narrow down the issue. After reading your message, I found the column that was causing the issue (due to the large record). I don't know if it helps, but I can tell you that the conflicted column is a JSON type on Postgres.

data_type: JSON
character_maximum_length: Empty
is_nullable: YES
column_default: Empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues community connectors/destination/snowflake team/destinations Destinations team's backlog type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants