I’ve got an array field that I want to mask based on User Attributes.
This was my first attempt:
case(
when:
in(1, H.current_user.pii_access),
then: core_table.array_data,
else: '(Restricted)'
)
The AML parses fine, but when I attempt to display the field in a widget I get the following error:
Error when executing SQL: (snowflake-sdk code: 001038) SQL compilation error: Can not convert parameter ''(Restricted)'' of type [VARCHAR(12)] into expected type [ARRAY]
I’ve tried casting core_table.array_data to a string, that doesn’t seem to work.
I also haven’t found any way of turning the string into an array.
I could do the cast in SQL but then I can’t refer to the user attributes.
Is there any way I can do this in Holistics without changing the field type in my source Snowflake database?