Api Call REST Endpoint to a Bigquery Table

I’m looking for a simple example or tutorial on writing data from a Call REST Endpoint to a Bigquery table. The endpoint task is working correctly, but I’m not certain how to configure the BQ connector and table when the endpoint contains lists in a few properties. I have a data mapping task between the other 2 but how is this configured?

thanks

1 Like

Hi Ruben
If the response from rest caller task is a list and you want to map it to Bigquery table -

you could use a parent integration with foreach loop task to loop through the response from rest caller task and subintegration to map that response to BigQuery connectorInputPayload

You can use a data transformer task in the subintegration to map the desired fields to connectorInputPayload object (script may vary based on the response schema from rest task)


local restResponse = std.extVar("restResponse");
{`Task_1_connectorInputPayload`:
{
DryRun: restResponse.dryRun,
Query: restResponse.query,
Region: restResponse.region
}
}
1 Like