Guillermo Serrano Lauroba
05/24/2024, 2:03 PMkapa.ai
05/24/2024, 2:03 PMGuillermo Serrano Lauroba
05/28/2024, 8:15 AMkapa.ai
05/28/2024, 8:15 AMjava.lang.RuntimeException: Failed to upload buffer to stage and commit to destination indicates that there was a failure during the process of uploading data to a staging area and subsequently committing that data to the final destination. This error can occur in various contexts within Airbyte, particularly when dealing with different destination connectors.
Here are some specific instances and causes of this error from the provided knowledge sources:
1. BigQuery Destination:
- The error can occur during the initial sync for a CDC (Change Data Capture) connection from a Postgres source to a BigQuery destination. The failure happens while uploading staging files to the destination table.
- Example stack trace:
java
java.lang.RuntimeException: Failed to upload buffer to stage and commit to destination
at io.airbyte.integrations.destination.bigquery.BigQueryStagingConsumerFactory.lambda$flushBufferFunction$4(BigQueryStagingConsumerFactory.java:169)
...
Caused by: java.lang.RuntimeException: [JobId{project=GCP_PROJECT, job=5196eeb4-5821-4682-a3c6-6b51dd0a64bf, location=US}] Failed to upload staging files to destination table GenericData{classInfo=[datasetId, projectId, tableId], {datasetId=source, tableId=_airbyte_raw_adapter_line_items}} (source)
at io.airbyte.integrations.destination.bigquery.BigQueryGcsOperations.lambda$copyIntoTableFromStage$0(BigQueryGcsOperations.java:156)
...
- [Source](https://github.com/airbytehq/airbyte/issues/26270)
2. Snowflake Destination:
- The error can also occur when syncing tables with the same name from different sources in parallel to a Snowflake destination. The failure is due to exceptions thrown while uploading records into the stage.
- Example stack trace:
java
java.lang.RuntimeException: Failed to upload buffer to stage and commit to destination
at io.airbyte.integrations.destination.staging.AsyncFlush.flush(AsyncFlush.java:126)
...
Caused by: java.lang.RuntimeException: Exceptions thrown while uploading records into stage: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:
Stage 'AIRBYTE_SYNCS_FULL_REFRESH."airbyte_internal"."companies"' does not exist or not authorized.
at io.airbyte.integrations.destination.snowflake.SnowflakeInternalStagingSqlOperations.uploadRecordsToStage(SnowflakeInternalStagingSqlOperations.java:94)
...
- [Source](https://github.com/airbytehq/airbyte/issues/30531)kapa.ai
05/28/2024, 8:15 AMjava.lang.RuntimeException: Failed to upload buffer to stage and commit to destination indicates that there was a failure during the process of uploading data to a staging area and subsequently committing that data to the final destination. This error can occur in various contexts within Airbyte, particularly when dealing with different destination connectors. Here are some specific instances and causes of this error from the provided knowledge sources: 1. BigQuery Destination: - The error can occur during the initial sync for a CDC (Change Data Capture) connection from a Postgres source to a BigQuery destination. The failure happens while uploading staging files to the destination table. - Example stack trace: java java.lang.RuntimeException: Failed to upload buffer to stage and commit to destination at io.airbyte.integrations.destination.bigquery.BigQueryStagingConsumerFactory.lambda$flushBufferFunction$4(BigQueryStagingConsumerFactory.java:169) ... Caused by: java.lang.RuntimeException: [JobId{project=GCP_PROJECT, job=5196eeb4-5821-4682-a3c6-6b51dd0a64bf, location=US}] Failed to upload staging files to destination table GenericData{classInfo=[datasetId, projectId, tableId], {datasetId=source, tableId=_airbyte_raw_adapter_line_items}} (source) at io.airbyte.integrations.destination.bigquery.BigQueryGcsOperations.lambda$copyIntoTableFromStage$0(BigQueryGcsOperations.java:156) ... - [Source](https://github.com/airbytehq/airbyte/issues/26270) 2. Snowflake Destination: - The error can also occur when syncing tables with the same name from different sources in parallel to a Snowflake destination. The failure is due to exceptions thrown while uploading records into the stage. - Example stack trace: java java.lang.RuntimeException: Failed to upload buffer to stage and commit to destination at io.airbyte.integrations.destination.staging.AsyncFlush.flush(AsyncFlush.java:126) ... Caused by: java.lang.RuntimeException: Exceptions thrown while uploading records into stage: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: Stage 'AIRBYTE_SYNCS_FULL_REFRESH."airbyte_internal"."companies"' does not exist or not authorized. at io.airbyte.integrations.destination.snowflake.SnowflakeInternalStagingSqlOperations.uploadRecordsToStage(SnowflakeInternalStagingSqlOperations.java:94) ... - [Source](https://github.com/airbytehq/airbyte/issues/30531) 3. Redshift Destination: - The error can occur in the context of a Redshift destination due to a StackOverflowError in the JOOQ library. - Example stack trace: java java.lang.RuntimeException: Failed to upload data from stage sor_hubspot_raw__stream_ab_contacts/2023_12_22_17_a23c67a1-3f97-49da-95ac-254046ab3db4/ at io.airbyte.cdk.integrations.destination.staging.GeneralStagingFunctions.copyIntoTableFromStage(GeneralStagingFunctions.java:101) ... Caused by: java.util.concurrent.CompletionException: java.lang.StackOverflowError at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ... Caused by: java.lang.StackOverflowError at org.jooq.impl.Function.toSQLFunctionName(Function.java:634) ... - [Source](https://