# Flattening json to BigQuery

**URL:** <https://community.make.com/t/flattening-json-to-bigquery/10780>\
**Category:** Questions\
**Tags:** json\
**Created:** [May 25, 2023, 4:28pm UTC](https://community.make.com/t/flattening-json-to-bigquery/10780 "2023-05-25T16:28:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier\_B](https://avatars.discourse-cdn.com/v4/letter/o/5f9b8f/32.png) [@Olivier\_B](https://community.make.com/u/Olivier_B)\
**Post date:** [May 25, 2023, 4:28pm UTC](https://community.make.com/t/flattening-json-to-bigquery/10780/1 "2023-05-25T16:28:10Z")

</div>

Hello,

I am currently trying to store data from an API call in BigQuery. It is a use case as I am working with Power Bi and need to store data in a data warehouse in order to use it in the multiple reports.

For this exemple I am requesting a weather forecast API.

Basically my flow is the following for now :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/d/dc49ea788befe56568c0a97fae5c3fc29e16ecaf.png)

My issue is that the json is composed of some collections as you can see in the following picture :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/8/82705afdab179159d034e350bf47f0ff43b96983.png)

As a consequence, when I post the json into BigQuery I have only one row with all the collections records in it:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/f/fcd8bd527ead8113cfcf55b4c4c59dd4705659bc.png)

I understand that the json needs to be flatten in order to match with bigquery requirements.

Do you have any advice on how can we flat json in Make ? I thought about store the json on a drive, and use python with cloudfunction to flat the json.

I assume the json can be flatten directly in Make. Is it possible to transform the json into a flatten json table and then convert it into a json to send it to BigQuery.

Would be reallly gratefull for any help with this issue and possible solutions.

---

<div class="post-metadata">

**Author:** ![Tiwa\_Shada](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tiwa\_Shada](https://community.make.com/u/Tiwa_Shada)\
**Post date:** [November 27, 2023, 12:41pm UTC](https://community.make.com/t/flattening-json-to-bigquery/10780/2 "2023-11-27T12:41:47Z")

</div>

Hey @Olivier_B have you tried and used the flatten function?

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/f/0f670995b9b7e8ac30c7f62229f7ef8f49ddec01.png)

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [February 25, 2024, 12:45pm UTC](https://community.make.com/t/flattening-json-to-bigquery/10780/3 "2024-02-25T12:45:22Z")

</div>


