BookmarkSubscribeRSS Feed
ARC2
Fluorite | Level 6

Say I have a SAS dataset (or a hive table) with an id variable plus variables x1-x5 and I want to read this data into a hive table with the x1-x5 in a hive array. What goes in the select statement to get those variables into an array? Or is select not the right way?

 

Thanks.

 

1 REPLY 1
Patrick
Opal | Level 21

That's not a SAS but a Hive SQL question.

After a quick Google seems there is an array() function for this.

 

From: https://dwgeek.com/hive-array-functions-usage-and-examples.html/

 
 
 

Following is the syntax of array function.

array(value1, value2, value2,...)

where, value is of type string or integer.

 
 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 427 views
  • 0 likes
  • 2 in conversation