Hello Mariska Janson,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having trouble flattening your JSON file in Dataflow.
To solve this issue, use the step by step below:
- In your Dataflow, select the
time
array to unroll. This will create a new row for each date. - After unrolling by
time
, you need to map thetemperature_2m_max
andtemperature_2m_min
values to each corresponding date. This can be done using a mapping transformation. - Ensure that the structure is flattened by mapping each element correctly. You might need to use a combination of transformations to achieve this.
This is an example of how you can structure your Dataflow transformations:
[
{
"type": "Unroll",
"field": "daily.time"
},
{
"type": "Map",
"mappings": [
{
"source": "daily.temperature_2m_max",
"target": "temperature_2m_max"
},
{
"source": "daily.temperature_2m_min",
"target": "temperature_2m_min"
}
]
}
]
If you continue to encounter errors, it will need to check the specific error messages in the data preview, as these can provide clues about what might be going wrong.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.