Specify data for an array field in csv file

#1

I have an entity type typeA, and it has a field fieldB which is an array of type typeB, like blow,

entity type typeA {
   fieldB: [typeB] schema name 'A_B'
}

If I would like to specify seed data for typeA in csv file, is it possible to specify value for fieldB?

id,name,fieldB
001,"Name","This does not work"
0 Likes

#2

Hi Chen,
The appropriate notation to load data into an array via a CSV is as follows:

id,name,fieldB[0].id,fieldB[0].otherField,fieldB[1].id,fieldB[1].otherField
001,“Name”,“1_1”,“A”,“1_2”,“B”

I hope this helps

2 Likes