BookmarkSubscribeRSS Feed
claudiodejesusa
Obsidian | Level 7
Hi everybody,

In my company, we manage hadoop datalake and oracle datawarehouse with limit of column name over 128 characters. Also, we have production tables with more than 40 characters on column names..

I want suggestions about how to deal these size of column names on SAS 9.4 and SAS Viya without cutting the name.

Thanks,
Claudio
Claudio
4 REPLIES 4
SASKiwi
PROC Star

A search of the SAS Communities will reveal a lot of posts on this topic. This one is probably the most useful: https://communities.sas.com/t5/SAS-Data-Management/Dealing-with-32-character-restrictions/m-p/100033...

 

Apart from @Kurt_Bremser 's workaround, you can use SQL Passthru to reference and query DBMS tables with names or columns greater than 32 characters. SAS has previously committed to increasing SAS table and column lengths to 128 characters but that was for a SAS release that is no longer happening - 9.5. I have not heard if this enhancement is on the SAS Viya 4 roadmap. If this is a major issue for you I suggest you pass that on to your SAS account manager. The more users who push for this enhancement the more likely it will happen.   

sbxkoenk
SAS Super FREQ

Hello,

 

You need to reduce to 32 chars or less.

 

This is how I do it using PROC FEDSQL :

/* Column name Draft_10_DieLifeForecast_Diameter         */
/* has 33 positions and is residing in an INTELDWD table */
/* INTELDWD is an AZURE SYNAPSE datalake                 */

proc FEDSQL sessref=manuSESSION;
create table CASUSER.test_table as (
  select Draft_10_DieLifeForecast_Diameter as test1
  from INTELDWD.C_Machine_Data_Temp) ;
QUIT;
/* end of program */

Cheers,

Koen

SASKiwi
PROC Star

@sbxkoenk - Good to know you can do this in FEQSQL as well as SQL Passthru.

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
  • 4 replies
  • 1445 views
  • 9 likes
  • 4 in conversation