<@U04S8PLJWMT> I am forking destination-redshift c...
# ask-ai
a
@kapa.ai I am forking destination-redshift connector, in order to use an iam role instead of aws access key and secret key for the "copy" query. After setting up a connection from Oracle to this new connector, I get the following error:
Copy code
2025-08-11 18:11:14 info Failures: [ {
  "failureOrigin" : "destination",
  "failureType" : "transient_error",
  "internalMessage" : "Some streams either received an INCOMPLETE stream status, or did not receive a stream status at all: null.REAL_FLIGHT_LEG_V\nio.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.",
  "externalMessage" : "Some streams were unsuccessful due to a source error. See logs for details.",
  "metadata" : {
    "attemptNumber" : 0,
    "jobId" : 139,
    "from_trace_message" : true,
    "connector_command" : "write"
  },
  "stacktrace" : "io.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.\n\tat io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.close(AsyncStreamConsumer.kt:215)\n\tat io.airbyte.cdk.integrations.base.SerializedAirbyteMessageConsumer$Companion$appendOnClose$1.close(SerializedAirbyteMessageConsumer.kt:70)\n\tat kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:48)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:215)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:119)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run$default(IntegrationRunner.kt:113)\n\tat io.airbyte.integrations.destination.redshift.RedshiftDestination$Companion.main(RedshiftDestination.kt:545)\n\tat io.airbyte.integrations.destination.redshift.RedshiftDestination.main(RedshiftDestination.kt)\n",
  "timestamp" : 1754928674013
}, {
  "failureOrigin" : "destination",
  "internalMessage" : "Destination process exited with non-zero exit code 1",
  "externalMessage" : "Something went wrong within the destination connector",
  "metadata" : {
    "attemptNumber" : 0,
    "jobId" : 139,
    "connector_command" : "write"
  },
  "stacktrace" : "io.airbyte.workers.internal.exception.DestinationException: Destination process exited with non-zero exit code 1\n\tat io.airbyte.container.orchestrator.worker.DestinationReader.run(ReplicationTask.kt:54)\n\tat io.airbyte.container.orchestrator.worker.DestinationReader$run$1.invokeSuspend(ReplicationTask.kt)\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n",
  "timestamp" : 1754928674115
} ]
k
Based on the information in the knowledge sources, your error message:
Copy code
Some streams either received an INCOMPLETE stream status, or did not receive a stream status at all: null.REAL_FLIGHT_LEG_V io.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.
indicates a transient error in the destination connector, specifically during the write phase. This is a generic error that can be triggered by a variety of issues in the destination connector, including but not limited to configuration problems, permission issues, or failures in the COPY operation to Redshift. Key points from the knowledge sources: - The error message and stack trace you provided are consistent with other transient errors seen in Airbyte destination connectors, especially when the destination process exits with a non-zero exit code due to an internal failure. This is often accompanied by a message like "Some streams were unsuccessful due to a source error. See logs for details" and a
TransientErrorException
in the logs. This pattern is seen in other Redshift and destination connector issues as well, such as [this example](https://github.com/airbytehq/airbyte/issues/45381). - When forking the Redshift connector to use an IAM role instead of access keys for the COPY command, it is crucial that the connector is properly updated to pass the role ARN to Redshift and that the Redshift cluster is configured to allow the COPY command to assume the specified IAM role. If this is not done correctly, the COPY command may fail silently or with a generic error, resulting in the kind of transient error you are seeing. - There is an open feature request to support passing a role's ARN instead of keys for the COPY strategy in the Redshift destination connector, indicating that this is not natively supported in all versions and may require careful custom implementation. Users have reported being blocked by the lack of this feature and have requested updates ([see discussion](https://github.com/airbytehq/airbyte/issues/41031)). What you should check: 1. Connector Implementation: Ensure your forked connector is correctly passing the IAM role ARN to the Redshift COPY command and not defaulting to using access keys. Double-check the logic where the S3 credentials are injected into the COPY statement. 2. Redshift & IAM Configuration: Make sure your Redshift cluster has the necessary permissions to assume the IAM role and that the role has the correct trust relationship and S3 access policies. 3. Logs: Review the full connector logs for more specific errors during the COPY operation. The generic error you posted is a wrapper; the underlying cause should be visible in the detailed logs. 4. Airbyte Version: If you are using a recent version of Airbyte, be aware that the connector codebase may have changed, and you may need to adapt your fork accordingly. Summary: The error is a generic transient error in the destination connector, likely related to your custom IAM role implementation for the COPY command. Carefully review your connector changes, IAM/Redshift configuration, and the detailed logs for the root cause. There is no explicit documentation or code in the knowledge sources that provides a ready-made solution for IAM role support in the COPY command, but the feature is requested and not yet standard in all versions of the connector. If you need further help, consider sharing the relevant connector code changes and the full error logs for more targeted troubleshooting. [See related discussion on IAM role support in Redshift destination](https://github.com/airbytehq/airbyte/issues/41031) [See example of similar transient error in Redshift destination](https://github.com/airbytehq/airbyte/issues/45381)
a
@kapa.ai The copy command works, the error comes later. Does that give you a clue?
k
A message from kapa.ai
Thank you for clarifying that the COPY command itself works and the error occurs later in the process. This is an important clue. Based on the knowledge sources, when the COPY command succeeds but errors occur afterward, it often points to issues in the post-COPY steps, such as: - Finalization/Normalization: After data is loaded into staging tables via COPY, Airbyte typically performs additional operations like normalization, deduplication, or moving data from staging to final tables. Errors in these steps can result in the kind of "INCOMPLETE stream status" or "Some streams were unsuccessful due to a source error" messages you are seeing. This pattern is visible in several Redshift connector issues, where the sync proceeds past the COPY but fails during or after normalization, sometimes due to missing or incomplete data, or connection issues during final SQL operations ([example](https://github.com/airbytehq/airbyte/issues/26821), [example](https://github.com/airbytehq/airbyte/issues/45381)). - Connection Pool/Resource Issues: There are multiple reports of HikariCP connection pool timeouts or connection refusals after the COPY step, which can cause the destination process to exit with a non-zero code. This can happen if the connector is unable to obtain a new connection for post-COPY operations, or if the Redshift cluster is temporarily unavailable or overloaded ([example](https://github.com/airbytehq/airbyte/issues/26821)). - Stream Status Handling: The error message about "INCOMPLETE stream status" suggests that not all streams completed successfully, possibly due to a failure in processing or finalizing one or more streams after the initial load. In summary: If the COPY command works but the error occurs later, the problem is likely in the post-COPY steps—such as normalization, final table writes, or connection management. Reviewing the detailed logs for errors immediately after the COPY step will help pinpoint the exact failure. The knowledge sources do not provide a specific root cause for your scenario, but they do confirm that such post-COPY failures are possible and often related to connection or finalization issues. If you can share the logs from just after the COPY step, it may help further narrow down the cause. [See similar post-COPY error patterns](https://github.com/airbytehq/airbyte/issues/26821)