CloudQuery News

Introducing The JSON Flattener Transformer Integration

One of the most common requests we've seen from the CloudQuery Developer Community is the ability to flatten JSON source data into separate columns at their destination. Until now, we didn't really have a way to do this, even though source integrations have been exposing JSON schema information for a while.

Today, we're excited to announce the release of the JSON Flattener Transformation Integration, a new CloudQuery Transformation Integration that enables you to flatten JSON source data into separate columns at your destination.

The problem

Let's say your sync is producing this table in the destination:

account_idregiondetails
012345678901us-west-1{"field_1": "2021-06-10 07:30:00", "field_2": "value_2", "field_3": true, "field_4": 4}
012345678901ca-central-1{"field_1": "2021-07-25 12:40:00", "field_2": "value_4", "field_3": false, "field_4": 5}
012345678901sa-east-1{"field_1": "2021-08-15 15:10:00", "field_2": "value_6", "field_3": null, "field_4": 6}

Often, one would want the details field to be flattened into separate columns, like this:

account_idregionfield_1field_2field_3field_4
012345678901us-west-12021-06-10 07:30:00value_2true4
012345678901ca-central-12021-07-25 12:40:00value_4false5
012345678901sa-east-12021-08-15 15:10:00value_6null6

The solution

The JSON Flattener Transformer Integration allows you to do just that! Without any additional configuration, it will flatten the details field into separate columns, while maintaining the original details field as well.

The transformed table will have the following columns:

  • account_id (string)
  • region (string)
  • details (JSON)
  • field_1 (timestamp)
  • field_2 (string)
  • field_3 (boolean)
  • field_4 (integer)

One important caveat is that the source integration must have exposed the JSON schema information for the details field. Although exposing JSON schema information has been supported in all CloudQuery Official plugins for the last 2 months, you may find that your plugin, or a particular table or field you're interested in does not expose this information yet. At the time of this writing, there's no way to provide this information from within the transformer plugin's spec.

A sample complete spec

Use the following spec with the AWS source plugin to flatten the aws_ec2_instances table.

kind: source
spec:
name: aws
path: cloudquery/aws
registry: cloudquery
version: 'v28.1.0'
tables: ['aws_ec2_instances']
destinations: ['postgresql']
spec:

And a PostgreSQL destination

kind: destination
spec:
name: 'postgresql'
path: 'cloudquery/postgresql'
registry: 'cloudquery'
version: 'v8.6.4'
write_mode: 'overwrite-delete-stale'
transformers:
- jsonflattener # we add the JSON Flattener transformer here
spec:
connection_string: '...'

Don't forget to add the JSON Flattener integration to your spec.

kind: transformer
spec:
name: 'jsonflattener'
registry: cloudquery
path: 'cloudquery/jsonflattener'
version: 'v1.0.0'
spec:

The JSON Flattener transformer integration is a powerful tool that can help solve many common data transformation challenges. By leveraging this integration, you can:

  1. Simplify complex nested JSON structures, making them easier to query and analyze in your destination database.
  2. Reduce storage requirements by combining flattening JSON objects and removing unneeded columns by leveraging the basic transformer.
  3. Improve query performance by eliminating the need for complex JSON parsing operations in filtering, grouping, joining and ordering clauses.

You can find more information about the JSON Flattener transformer integration, including detailed configuration options and examples, in our JSON Flattener transformer Integration documentation.

We're always looking to improve our tools and make them more useful for our community. Your feedback is invaluable in this process. If you have any questions, suggestions, or encounter any issues while using the JSON Flattener transformer plugin, please don't hesitate to reach out to us in the CloudQuery Community. If you're ready to get started, download the CloudQuery CLI today!

Try CloudQuery yourself

Self-hosted, open source, and free to start. Or schedule a demo to see the managed version.

Related posts

CloudQuery News

Introducing CloudQuery Insights: Cloud Intelligence That Connects the Dots

CloudQuery Insights automatically surfaces connected signals across your cloud inventory: security findings, cost data, policy violations, and audit trails.

Joe Karlsson

Joe Karlsson

April 21, 2026

Cloud Infrastructure

CloudQuery News

Introducing the Nautobot Source Integration

Sync Nautobot DCIM inventory data to PostgreSQL, BigQuery, or Snowflake and query it with SQL alongside your cloud provider data.

Joe Karlsson

Joe Karlsson

March 19, 2026

CloudQuery News

CloudQuery Is Merging with Env Zero

A letter from CloudQuery CEO Yevgeny Pats on the merger with env zero and what it means for customers.

Yevgeny Pats

Yevgeny Pats

March 17, 2026

CloudQuery News

Security

Introducing the Zoom Source Integration

New CloudQuery Zoom source plugin: sync Zoom meeting, user, and webinar data into your database for compliance, analytics, and user access governance reporting.

Joe Karlsson

Joe Karlsson

February 2, 2026

CloudQuery News

Product News

New in CloudQuery: Tines + Semgrep integration, and native visualizations,

CloudQuery October 2025 updates: Tines and Semgrep integration for security orchestration, plus native visualization support in the CloudQuery Platform.

Chris Reuter

Chris Reuter

October 31, 2025

CloudQuery News

Product News

Security

Introducing Data Access Control for CloudQuery Platform

CloudQuery Platform RBAC: Control cloud asset access with SQL-based permissions. Map Azure AD/Okta groups to roles. Available now on all environments.

Joe Karlsson

Joe Karlsson

October 28, 2025

AI

CloudQuery News

Understand your cloud infra faster using natural language

CloudQuery unifies AWS, GCP, Azure, and SaaS configs into SQL tables. The new AI assistant lets you query your cloud inventory using natural language.

Chris Reuter

Chris Reuter

September 29, 2025

CloudQuery News

Find the Cloud Waste Contest

Win CloudQuery swag by finding cloud waste in our dataset. Sync AWS data with CloudQuery, solve 3 SQL challenges, get t-shirts, sweatshirts, and mugs.

Joe Karlsson

Joe Karlsson

September 25, 2025

AI

CloudQuery News

Generate CloudQuery Configuration with Natural Language

Generate CloudQuery config files from natural language prompts. Use AI to quickly create source and destination plugin configs without manual YAML editing.

Chris Reuter

Chris Reuter

September 23, 2025

Own your pipeline.
Own your data.