Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Phoenix Array datatype issue

New Contributor

@Timothy Spann

Hi Timothy. I am using Phoenix for my project and I am stuck with Array types. My query is, suppose I have an array column in my table, I am inserting the data in that array, and after some time, weeks, months I will need to update the array, basically append/remove the data to/from it, basically modify the array but I am unable to find the solution for it.

Could you help me with this?

I found this in the Limitations of array on -->

Partial update of an array is currently not possible. Instead, the array may be manipulated on the client-side and then upserted back in its entirety.

Is there any work around for this?

Phoenix array type:

Thanks in advance.



I would try to eliminate arrays from the design. Maybe remove the array column from the original table and instead have another table with two columns: one references the row of the old table, one contains the array members (one member per row.) This way you can leverage atomicity guarantees which you miss when trying to manipulate arrays.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.