<@U04S8PLJWMT>, I'm trying to set up multiple conn...
# ask-ai
a
@kapa.ai, I'm trying to set up multiple connections between MongoDB (connector version 2.0.4) and BigQuery (connector version 3.0.7), from the same MongoDB cluster towards the same BigQuery dataset. I want them to be separate connections in order for them to not fail all together. However, when I'm creating the second connection, I'm always getting this error, referencing the namespace from the first connection: "Stream not found:..."
k
Based on the information in the knowledge sources, Airbyte now enforces unique stream identifiers (either by prefix or namespace) across all connections that share a destination. This means you cannot have multiple connections writing to the same destination stream (i.e., the same table in the same dataset) in BigQuery. This change was made to prevent data loss and concurrency issues that can occur when multiple connections write to the same table at the same time. As a result, when you try to create a second connection targeting the same BigQuery dataset and table names, you encounter the "Stream not found" or similar errors referencing the namespace from the first connection. To resolve this, you must use a unique prefix for each stream or a unique namespace for each connection. After syncing, you can combine your tables downstream in BigQuery if needed. This is now a mandatory requirement in Airbyte as of version 1.6 and later. More details can be found in the release notes: [Unique stream prefixes or namespaces are now mandatory](https://docs.airbyte.com/release_notes/v-1.6#unique-stream-prefixes-or-namespaces-are-now-mandatory). If you want to avoid concurrency issues and keep your connections separate, you should configure each connection to write to a different namespace (dataset) or use a unique stream prefix. There is no supported way to have multiple connections write to the exact same destination table in BigQuery anymore.
A message from kapa.ai
Airbyte requires that stream identifiers (the combination of namespace and stream name) be unique across all connections that share the same destination. This means you cannot have multiple connections writing to the same table in the same BigQuery dataset. If you attempt to do so, you will encounter errors like the one you described, referencing the namespace from the first connection. This is a deliberate design to prevent data loss and concurrency issues that can arise when multiple connections write to the same destination table simultaneously. To resolve this, you must ensure that each connection writes to a unique destination stream. You can achieve this by: - Using a unique namespace (BigQuery dataset) for each connection, or - Using a unique stream prefix for each connection, so that the table names in BigQuery are different for each connection. If you need to combine the data from multiple connections into a single table, you should do this downstream in BigQuery after Airbyte has completed the syncs. This requirement is documented as of Airbyte version 1.6 and later [Unique stream prefixes or namespaces are now mandatory](https://docs.airbyte.com/release_notes/v-1.6#unique-stream-prefixes-or-namespaces-are-now-mandatory) and in the core schema configuration documentation [Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#stream-uniqueness). If you want to avoid concurrency issues and keep your connections separate, you must configure each connection to write to a different namespace or use a unique stream prefix. There is no supported way to have multiple connections write to the exact same destination table in BigQuery anymore. If you need further details on how to configure namespaces or stream prefixes, please let me know!
a
I added a prefix to each connection, but I'm still getting it: java.lang.IllegalArgumentException: Stream not found: Descriptor(namespace=reward-schemes, name=coupons_small_customertags)
@kapa.ai?
k
A message from kapa.ai
The error you're encountering when creating a second connection from the same MongoDB cluster to the same BigQuery dataset is due to Airbyte's requirement that stream identifiers (the combination of namespace and stream name) must be unique across all connections sharing a destination. This rule was introduced to prevent data loss and concurrency issues that can occur when multiple connections write to the same destination table at the same time. If you try to create multiple connections that write to the same table in the same BigQuery dataset, Airbyte will block this and show an error referencing the namespace from the first connection. To resolve this, you must ensure each connection writes to a unique destination stream. You can do this by: - Assigning a unique namespace (BigQuery dataset) for each connection, or - Using a unique stream prefix for each connection, so the resulting table names in BigQuery are different. If you need to combine the data from multiple connections into a single table, you should do this downstream in BigQuery after Airbyte has completed the syncs. This is now a mandatory requirement in Airbyte as of version 1.6 and later [Unique stream prefixes or namespaces are now mandatory](https://docs.airbyte.com/release_notes/v-1.6#unique-stream-prefixes-or-namespaces-are-now-mandatory) and is also described in the schema configuration documentation [Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#stream-uniqueness). If you need more details on how to set up unique namespaces or stream prefixes, let me know!
a
@kapa.ai, I'm using different stream prefixes and still getting the error though
k
A message from kapa.ai
If you are using different stream prefixes for each connection and are still getting the "Stream not found" error, this is unexpected based on Airbyte's documented behavior. According to the official documentation, using a unique stream prefix or a unique namespace for each connection should prevent conflicts and allow multiple connections to the same destination dataset, as long as the resulting stream identifiers (namespace + stream name) are unique for each connection [Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#stream-uniqueness). However, there are a few possible reasons for the error: 1. Prefix Uniqueness: Double-check that the stream prefixes are truly unique for each connection and that there is no overlap in the resulting destination table names. 2. Namespace Conflicts: If you are not also using unique namespaces, ensure that the combination of namespace and stream prefix is unique across all connections. 3. Known Issues or Bugs: There have been reports of issues where certain character combinations in prefixes or other edge cases can cause errors or unexpected behavior. For example, a 500 error can occur if there is a collision in the prefix or if the same source/destination combination is used with the same prefix, even if the prefix appears unique ([prefix property of connection causes 500 error](https://github.com/airbytehq/airbyte/issues/56452)). If you have confirmed that your prefixes are unique and are still experiencing this issue, it may be a bug or an edge case not covered in the documentation. In such cases, it is recommended to: - Try using both a unique stream prefix and a unique namespace for each connection. - Review the exact error message and logs for more details. - If the problem persists, consider opening a GitHub issue or reaching out to Airbyte support with your configuration details and error logs. The knowledge sources do not provide a definitive solution for your specific scenario if unique prefixes are already in use and the error persists. If you can share the exact configuration and error message, it may help in further diagnosing the issue.
a
@kapa.ai, I tried a new connection with a different dataset now. Destination of new connection: airbyte2 Source: database: coupons and got this: } 2025-10-02 163530 platform > failures: [ { "failureOrigin" : "destination", "failureType" : "system_error", "internalMessage" : "java.lang.IllegalArgumentException: Stream not found: Descriptor(namespace=reward-schemes, name=coupons_coupons_coupons_coupons_small_customertags)", "externalMessage" : "Stream not found: Descriptor(namespace=reward-schemes, name=coupons_coupons_coupons_coupons_small_customertags)", reward-schemes is a different source database (so it shouldn't be a destination namespace) and customertags is also a different collection, from the conneciton with prefix small_. And for some reason, the error has this crazy name, with 5 prefixes all together: coupons_coupons_coupons_coupons_small_customertags
k
A message from kapa.ai
Based on the information in the knowledge sources, Airbyte requires that each stream identifier (the combination of namespace and stream name) be unique across all connections sharing a destination. You are correctly using a different dataset (
airbyte2
) for your new connection, which should avoid direct conflicts. However, the error message you are seeing:
Copy code
Stream not found: Descriptor(namespace=reward-schemes, name=coupons_coupons_coupons_coupons_small_customertags)
suggests that Airbyte is constructing a stream name with multiple repeated prefixes, which is not expected behavior. The documentation does not describe a scenario where Airbyte would concatenate the prefix multiple times or mix up namespaces in this way. Normally, the stream prefix should only be prepended once to the stream name, and the namespace should reflect the source or the configured destination namespace, not another source database [Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#modify-stream-names). There are a few possible explanations based on the knowledge sources: 1. Prefix/Namespace Handling Bug: There have been reports of issues with prefix handling, especially if there are collisions or unexpected combinations in the configuration. For example, a 500 error can occur if the same source/destination combination is used with the same prefix, even if the prefix appears unique ([prefix property of connection causes 500 error](https://github.com/airbytehq/airbyte/issues/56452)). 2. Internal State or Migration Issues: If Airbyte's internal state or metadata is not fully reset between connections, it might be reusing or incorrectly combining previous prefixes or namespaces, leading to unexpected stream names. 3. Stream Uniqueness Enforcement: Airbyte enforces uniqueness of stream identifiers, and if there is any overlap or confusion in how prefixes/namespaces are applied, it may result in errors or odd stream names [Unique stream prefixes or namespaces are now mandatory](https://docs.airbyte.com/release_notes/v-1.6#unique-stream-prefixes-or-namespaces-are-now-mandatory). What you can try: - Double-check your connection configuration to ensure that the stream prefix is only set once and is unique. - Make sure that the namespace format is not being set in a way that could cause repeated concatenation. - If possible, try creating a completely new connection with a simple, unique prefix and a new dataset to see if the issue persists. - If the problem continues, it may be a bug or an edge case not covered in the documentation. In that case, consider opening a GitHub issue with your configuration details and error logs. The knowledge sources do not provide a definitive answer for why the prefix is being repeated multiple times in the stream name. This behavior is not described in the official documentation, and may indicate a bug or misconfiguration. If you can share your exact connection configuration (prefix, namespace settings, etc.), it may help further diagnose the issue. Otherwise, reaching out to Airbyte support or opening a GitHub issue is recommended, as this does not match the expected documented behavior [Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#modify-stream-names).