To set up multiple connections between MongoDB (co...
# ask-ai
k
To set up multiple connections between MongoDB (connector version 2.0.4) and BigQuery (connector version 3.0.7) in Airbyte, you should follow these general steps: ### 1. MongoDB Connector Configuration - Version 2.0.4 of the MongoDB V2 connector supports syncing collections from multiple databases in a single source configuration. This is a recent feature (since v2.0.0), so ensure your source configuration uses the
databases
array field instead of the old
database
field. If you are upgrading from an older version, you must reconfigure your source as described in the [migration guide](https://docs.airbyte.com/integrations/sources/mongodb-v2-migrations) and [changelog](https://docs.airbyte.com/integrations/sources/mongodb-v2#changelog). - User Permissions: For MongoDB Atlas, the user must have the
readAnyDatabase
privilege to sync multiple databases. For self-hosted MongoDB, create a read-only user with access to the relevant databases. Detailed steps are available in the [MongoDB V2 quick start guide](https://docs.airbyte.com/integrations/sources/mongodb-v2#quick-start). ### 2. BigQuery Connector Configuration - Set up your BigQuery destination connector (version 3.0.7) in Airbyte. You will need to provide the dataset ID, project ID, and service account credentials (as a JSON string) when configuring the destination. This can be done either via the Airbyte UI or using Terraform, as shown in several tutorials ([example](https://airbyte.com/tutorials/building-an-e-commerce-data-pipeline-a-hands-on-guide-to-using-airbyte-dbt-dagster-and-bigquery)). ### 3. Creating Connections - Via Airbyte UI: - Create a MongoDB source using the new configuration (with the
databases
array). - Create a BigQuery destination. - Create a connection between the source and destination, selecting the collections and sync mode as needed. - Via Terraform: - Use the
provider.tf
,
main.tf
, and
variables.tf
files to define your Airbyte resources. - Specify your MongoDB and BigQuery configurations in
main.tf
. - Initialize and apply your Terraform configuration to create the connectors and connections ([example](https://airbyte.com/tutorials/e-commerce-analytics-with-airbyte-dbt-dagster-and-bigquery)). ### 4. Notes and Troubleshooting - If you encounter issues with large MongoDB databases (e.g., slow schema discovery or timeouts), ensure your Airbyte instance has sufficient resources and that your MongoDB user has the correct permissions. There have been reports of timeouts and slow queries when syncing large databases, so monitor logs and adjust resources as needed. If you see errors during schema discovery, check the Airbyte and MongoDB logs for more details ([forum example](https://discuss.airbyte.io/t/1793), [github issue](https://github.com/airbytehq/airbyte/issues/8564)). - Always verify your connections in the Airbyte UI after setup to ensure everything is configured correctly. If you need step-by-step Terraform or UI instructions, let me know which method you prefer, and I can provide more detailed guidance based on the tutorials and documentation. Note: The knowledge sources do not provide specific details about the BigQuery connector version 3.0.7, but the general setup process remains the same as described above for recent versions. If you encounter version-specific issues, please consult the official Airbyte documentation or changelogs for those connectors.