Include only specific columns from array

Hi,
Maybe someone know who to solve it:

I am streaming data from magento to Biq Query table which doesn’t contain all fields which Magento source contains.

How to exclude or only include columns for item array ( can be more than one item in order) to achieve only this one which I want to stream to BQ table?

For example I was trying with pick function but BQ table is updated without array items.

There should be loaded information about two items in this magento order.

Hello, this looks similar to your other question that you also just posted. Are your goals the same for both questions? If they are the same, could you delete/close one to keep the answers in one thread? Thank you.

1 Like

I’ve already deleted duplicated post. It was created by mistake.

1 Like

Hi @Justyna_Lodziarek

While mapping data from one module to another, ensure that you are following uniformity of datatype.
Here, in BigQuery field - check the type of data they accept by toggling the map.

Then ensure that you are mapping the same data format. To test this, you can initially try your formula in module “Set Variable” before testing in the actual module (BigQuery).

Hope this helps.

MSquare Support
Visit us here
Youtube Channel

2 Likes

After using "set variable I’ve got:


image

BQ table structure:

I am wondering what kind of function I should use in my case to set only columns which i want to stream from Items array not get all of them as default mapping.

Hi @Justyna_Lodziarek,

I could see that pick function accepts object datatype that means “collections”. However, during the mappings, array is mapped.

Please check the type of data the field accepts by hovering over the field name before mapping the values.
Screenshot 2023-11-27 165214

If the field data type is not an array, map the collection inside “pick” function and hard-code the names of desired columns.

Note: please check the names of columns also by hovering over them or copy from output bundles
Screenshot 2023-11-27 165727

In case you get more than one bundles inside items array, please go with iterator and aggregator before mapping in BigQuery

Select the fields in aggregator you want to get

You will receive the output like this

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

2 Likes

Hi,
Thank you for response.
I used iterator and then aggregator to achieved array withspecific columns I would like to hvae it n array for items:)

2 Likes

Hey @Justyna_Lodziarek :wave:

Congratulations on the great job you, @samliew, and @Msquare_Automation did while solving these troubles of yours :clap:.

Also thank you very much for sharing your solution with us. We deeply appreciate that you kept us in mind. This way other users can benefit from your advice. :pray:

Keep up the good work! :sunny:

2 Likes