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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 528 views
  • 0 likes
  • 2 in conversation