Hi Team , I am using airbyte to connect from mongo...
# replication-troubleshooting
b
Hi Team , I am using airbyte to connect from mongo to bigquery , but the data i am getting its in a single column as a json , i need the data to be splitted into different columns as in my native original table.What is the solution for this basic normailzation ? In my connection setting its not showing normalisation option , is it because i am using free trial version ?
k
When syncing data from MongoDB to BigQuery using Airbyte, if you see all your data in a single JSON column (often called
_airbyte_data
), this means normalization (the process that flattens JSON into separate columns) is not enabled or not available for your connection. Solution for Basic Normalization: - Airbyte’s normalization feature is what splits JSON blobs into separate columns in your destination. For BigQuery, this is typically called “Normalized tabular data” in the connection settings. - If you do not see the normalization option in your connection settings, it may be due to the version of Airbyte you are using, or because of recent changes in how normalization is handled. Airbyte has been transitioning from "basic normalization" to a new system called "Typing & Deduping" (Destinations V2), which may affect the availability and behavior of normalization options in your UI. In Destinations V2, raw JSON-only replication is no longer supported, and data is always typed and split into columns where possible. This change is not related to whether you are on a free trial or paid version, but rather to the version of Airbyte and the destination connector you are using. See more details in the [Destinations V2 upgrade guide](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2). - If you are still seeing only a single JSON column, it is possible that: - Your destination connector does not yet support Destinations V2, or - The normalization/typing feature is not enabled or available for your connector version. - For BigQuery, arrays of objects and nested structures from MongoDB can sometimes be mapped as repeated strings or JSON blobs, rather than fully expanded columns, due to limitations in the normalization process. This is a known issue and may require updates to the connector or Airbyte version to resolve fully. See this [GitHub issue](https://github.com/airbytehq/airbyte/issues/20061) for more context. What you can do: 1. Make sure you are using the latest version of Airbyte and the BigQuery destination connector. 2. Check if your connection is using Destinations V2 (Typing & Deduping). If so, data should be split into columns automatically. 3. If you are still on legacy normalization and do not see the option, upgrading Airbyte and your connectors is recommended. 4. If you need to programmatically enable normalization, it is possible by specifying the correct operation in the API call (see example in this [forum post](https://discuss.airbyte.io/t/4002)), but this is only relevant if the feature is available for your connector and Airbyte version. Summary: The absence of the normalization option is not due to the free trial, but rather to the Airbyte version and connector capabilities. Upgrading to the latest Airbyte and connector versions should resolve this and enable column splitting for your MongoDB to BigQuery syncs. If you continue to see only JSON blobs, check for known issues with nested structures and consider reaching out to Airbyte support or the community for further troubleshooting. If you need more specific guidance, please provide your Airbyte and connector versions.
b
Can you tell me how to Upgrade to the latest Airbyte and connector versions will resolve this and enable column splitting for your MongoDB to BigQuery syncs.
@kapa.ai Can you tell me how to Upgrade to the latest Airbyte and connector versions will resolve this and enable column splitting for your MongoDB to BigQuery syncs.
k
A message from kapa.ai
To upgrade to the latest Airbyte and connector versions and enable column splitting (normalization) for your MongoDB to BigQuery syncs, follow these steps: ### 1. Upgrade Airbyte (Self-Managed) If you are using Airbyte on Kubernetes with Helm: 1. Check your current chart version:
Copy code
helm list -n <NAMESPACE>
2. Review the [release notes](https://docs.airbyte.com/release_notes/) and [ArtifactHub](https://artifacthub.io/packages/helm/airbyte/airbyte) for the latest versions. 3. Update your
values.yaml
file if needed. 4. Run the upgrade command:
Copy code
helm upgrade --install <RELEASE-NAME> airbyte/airbyte --values <VALUES.YAML> --version <HELM-APP-VERSION>
For Helm chart V2, the command is:
Copy code
helm upgrade airbyte airbyte-v2/airbyte \      --namespace airbyte-v2 \      --values ./values.yaml \      --version 2.x.x
5. After a few minutes, port-forward to access the Airbyte UI:
Copy code
kubectl -n airbyte port-forward deployment/airbyte-server 8080:8001
[More details here](https://docs.airbyte.com/platform/operator-guides/upgrading-airbyte) If you are using abctl (local install): - Run:
Copy code
abctl local install
- To check your version:
Copy code
abctl local status
- To upgrade abctl itself:
Copy code
brew upgrade abctl
[Instructions here](https://docs.airbyte.com/platform/operator-guides/upgrading-airbyte) ### 2. Upgrade Connectors - In the Airbyte UI, go to Workspace settings > Sources or Destinations. - Find the MongoDB and BigQuery connectors. - Click Change or Upgrade to update to the latest available version. - For each connection, select the instance and follow the prompts to upgrade. - Review the migration guides for [MongoDB](https://docs.airbyte.com/integrations/sources/mongodb-v2-migrations) and [BigQuery](https://docs.airbyte.com/integrations/destinations/bigquery-migrations) for any breaking changes or required configuration updates. [Connector upgrade steps and best practices](https://docs.airbyte.com/platform/managing-airbyte/connector-updates#actions-to-take-in-response-to-connector-updates) ### 3. After Upgrading - Refresh your source schema in the connection settings. - Save changes and clear data for affected streams if there were breaking changes. - Run a sync. With the latest versions, Airbyte should automatically split JSON data into columns in BigQuery, provided the connectors support Destinations V2 (Typing & Deduping). Note: If you still see only JSON columns after upgrading, check the connector migration guides for any limitations or additional steps required for nested data structures. --- Upgrading both Airbyte and your connectors as described above will ensure you have access to the latest normalization features, enabling column splitting for your MongoDB to BigQuery syncs [Upgrading Airbyte](https://docs.airbyte.com/platform/operator-guides/upgrading-airbyte) [Managing Connector Updates](https://docs.airbyte.com/platform/managing-airbyte/connector-updates#actions-to-take-in-response-to-connector-updates).
b
@kapa.ai Still JSON columns after upgrading also
k
A message from kapa.ai
If you are still seeing JSON columns in BigQuery after upgrading Airbyte and your connectors, there are a few important points to consider based on the official documentation and community reports: 1. Destinations V2 and Data Types: With Destinations V2, Airbyte now loads JSON blobs as type
JSON
in BigQuery instead of
STRING
. This means that nested objects and arrays from sources like MongoDB are stored as JSON columns in BigQuery, rather than being fully flattened into separate columns. This is by design and leverages BigQuery's native support for semi-structured data. If you expect full flattening (each field as its own column), this may not always happen automatically, especially for deeply nested or dynamic structures from sources like MongoDB. You may need to use SQL to further extract fields from the JSON columns in BigQuery if needed. See the [release notes](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2#destinations-v2-implementation-differences) for more details. 2. Known Limitations with Nested Structures: There are known issues where arrays of objects or complex nested structures from MongoDB are mapped as JSON or repeated strings in BigQuery, rather than as fully expanded columns. This is a limitation of the current normalization/typing process and has been reported by other users as well. For example, see [this GitHub issue](https://github.com/airbytehq/airbyte/issues/20061). 3. No Option for Raw-Only Tables: With Destinations V2, the option to only replicate raw data is removed, and all data is typed and delivered to final tables. However, the typing process may still result in JSON columns for complex or dynamic fields, especially from schema-less sources like MongoDB [Upgrading to Destinations V2](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2). 4. What You Can Do: - If you need fully flattened tables, you may need to use dbt or SQL transformations in BigQuery to extract fields from the JSON columns. - Review your MongoDB source settings: If schema enforcement is disabled, Airbyte will output a generic structure with a
data
JSON field, which will always be a JSON column in BigQuery. Enabling schema enforcement may help, but only for fields that are consistently present and typed in your MongoDB documents [MongoDB Source Docs](https://docs.airbyte.com/integrations/sources/mongodb-v2#replication-methods). Summary: Even after upgrading, it is expected in many cases (especially with MongoDB as a source) that some or all fields will be stored as JSON columns in BigQuery. This is due to the flexible and nested nature of MongoDB data and the current design of Airbyte's normalization/typing process for BigQuery. If you require further flattening, you will need to implement additional transformations in your data warehouse. If you have a specific example or structure that is not being handled as expected, please provide more details, and I can help you troubleshoot further.