내 커뮤니티 업적 표시줄을 확대합니다.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
해결됨

Writing data into string datatype of array[]

Avatar

Employee

Hello

 

when the following field is present upon a schema, I am facing an issue when attempting to write data into the field.

"sampleField": {
  "title": "Sample Array Field",
  "description": "An example array field using a primitive type.",
  "type": "array",
  "items": {
    "type": "string"
  }
}

 The field is defined as field[], which is just an array based field.

 

I have attempted to use collect_set to insert data into the field, but getting an error message of object is not compatible of target type string. 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

I was able to figure out the issue I was facing. The data ingested into the datalake had empty string values which was not being accounted for.

 

Using arrag_agg(column_name) filter (where column name is not null) allowed for the insert of data into the new dataSet.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Community Advisor

Hi @brekrut 

can you give more context when/how/where you are trying to set the field?

 

Cheers

Cheers from Switzerland!


Avatar

Employee

Hello @bjoern__koth 

 

I have a schema which has a field defined a foo[] of array.  Data has been ingested into dataSetA but I am attempting to use query service to write data into a new dataSet which has been built against the same schema containing the field defined as foo[].

 

 

Avatar

정확한 답변 작성자:
Employee

I was able to figure out the issue I was facing. The data ingested into the datalake had empty string values which was not being accounted for.

 

Using arrag_agg(column_name) filter (where column name is not null) allowed for the insert of data into the new dataSet.