Is there a way to pass a column label from a SAS dataset to an Oracle table and then from an Oracle table to Visual Analytics?
formats and labels are unique to each database and sas. So transferring them is not possible.
Articles online said the same thing. I was hoping there was an easy way though. I am looking at relabeling seven hundred labels. I am going to look into scripting the labels in the Visual Analytics data preparation section. If I have a list of column names and what the label should be, I should be able to do a manual labeling from a semi manual script generation.
If the variables in SAS and Oracle have the same names then it shouldn't be that hard to retrieve the labels from the SAS variables (i.e. using dictionary.columns) and then generate SQL alter table statements as Oracle Pass-Through code.
Why are you loading SAS data into Oracle and then reading it back into Visual Analytics as SAS data?
If you need Oracle data combined with SAS data, extract it into SAS first, build your VA load table in SAS (with labels) and load it into VA from there. That way you can keep your SAS labels without any problem.
if you declare your library like libname &p_inputlibref meta library="&p_saslibname";
This is a connection to a SQL database.
proc sql;
select strip(name) || "='" || strip(label) || "'" into :label_list separated by ' '
from dictionary.columns
where upcase(memname) = upcase("&_INPUTREF");
quit;
%put &label_list;
The only thing left is to apply this to the LASR table. At this point i'm still struggling with that because a proc datasets and modify is not allowed?
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!
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.