Hi, I am very new to Snowflake. I am trying to create a SAS dataset from a snowflake table using SAS/ACCESS interface to Snowflake. I can successfully connect to Snowflake database and can create a SAS dataset without errors. Problem is that some of the columns are defined as arrays in Snowflake and after bringing data Snowflake databases into SAS environment, SAS reads array objects as a string where each element of original Snowflake array column is quoted and concatenated inside of a square bracket. I would like to read each element of the Snowflake array as a column in SAS. To add to the complexity a Snowflake column array may have different number of elements in each row.
This is what I have:
ID
Snowflake Array Column: HCPCS_CD
PROC PRINT showing SAS column as a string: HCPCS_CODE
1
J3490, J3590, AAAXT
["J3490", "J3590", "AAAXT"]
2
A990, B210
["A990", "B210"]
3
C220, B210, J3490, J3590
["C220", "B210", "J3490", "J3590"]
I would like SAS dataset to have variable HCPCS_CD into multiple character columns one for each element of the array:
ID
HCPCS_CD1
HCPCS_CD2
HCPCS_CD3
HCPCS_CD4
1
J3490
J3590
AAAXT
2
A990
B210
3
C220
B210
J3490
J3590
If SAS can read a Snowflake array column directly as a SAS array that would work too.
Thanks and appreciate any help.
... View more