Mapping STRING REPEATED

HI,
Maybe someone will know how I should correctly map data for field street where I could have more rows than 1 for street info.
When I am trying to map as on picture I’ve got error



example data in existing table in BQ:
image

Hello,

What is the data type of “street” in BigQuery? Is it a string or array or a collection? You can uncheck the Map to see the structure.

If it’s a string, since street comes out as an array from your datasource, to submit a string in BigQuery, you can convert array to string by using the join() function.

Something like this: {{join(Billing address: Street[];, )}}

Basically this will take two lines, combine them, separates by a comma and space.
If you want to separate by a new line instead, use something like:
{{join(Billing address: Street[];{{newline}})}}

3 Likes

Hi @Donald_Mitchell
I noticed mentioned error appeared because of different field street mapping in extensions_attributes.shipping.adress.street


Maybe there is a problem because adress array is set in BQ as NULLABLE not REPEATED?

I’ve checked your previous sugestion for this case but it doesn’t work. Still the same error

I mapped here 1 item and I wondering how to deal with street collaction in this case.

Hi @Justyna_Lodziarek

As I could see the other fields are accepting text value. Please check the data type of street field. If it is also text type, you could achieve the desired result using the following way:

Try mapping the direct values instead of array

If there can be multiple values inside an array, you could use numbers inside the mapping as shown in the image

Screenshot 2023-12-01 165938

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

2 Likes

I used below mapping for street in Billing address array.

For shipping I used your suggestion with newline but it doesnt work.

@Justyna_Lodziarek

Could you please share the screenshot of input data in error window?

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

1 Like