/
Parsing and exploding JSON arrays in Wrangler

Parsing and exploding JSON arrays in Wrangler

You can parse and explode JSON files with arrays in Wrangler.

Wrangler supports up to 10 MB for sampling files, so if the JSON file is large, store it in Google Cloud Storage or BigQuery.

To parse JSON files with arrays, follow these steps:

  1. In Wrangler, select the JSON file you want to parse. Wrangler displays the JSON as a single row of String data type.

  2. Click the down arrow to the left of the column and click Parse > JSON.

  3. Select the required Depth and click Apply.
    If the JSON has an Array, Wrangler displays Array data type above the column:

  4. Find the Array column, click the down arrow, and click Explode > Array (by flattening).

This explodes the elements in the JSON array as individual records in the same column in Wrangler.

Continue adding directives to transform the data before creating a data pipeline.

 

 

Related content

Parsing Prettified JSON
Parsing Prettified JSON
More like this
Creating a reusable pipeline with the GCS Argument Setter
Creating a reusable pipeline with the GCS Argument Setter
Read with this
Parsing Files in Wrangler
Parsing Files in Wrangler
More like this
Pipeline Structure
Pipeline Structure
Read with this
Directives
More like this
Pub/Sub Streaming Source Best Practices
Pub/Sub Streaming Source Best Practices
Read with this

Created in 2020 by Google Inc.