BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

Hello,

 

I have my labels stored in a macrovariable. I want to apply them to my LASR table but i'm receiving an error.

Do i have to change the assigning of my library? Or are there other possibilties? I prefer not to do a datastep.

 

proc datasets library=&lasrLibref;
modify &outtable;
label &label_sql_dataset;
run;

 

ERROR: Update access is not supported for file KS1BU01L.TEST_1510_1149.DATA.

 

4 REPLIES 4
alexal
SAS Employee

@Filipvdr,

 

You have to use metadata_setattr function, because you need to update a metadata entry for that table.

data _null_;
rc=metadata_setattr("omsobj:PhysicalTable?@Id='<TABLE_ID>'","Desc","This is a new label");
put rc=;
run;
Filipvdr
Pyrite | Level 9

Is your code for column label? Or for the table label?

alexal
SAS Employee

That code will update the metadata column "Description".

Filipvdr
Pyrite | Level 9

Hi, 

 

I've solved it with putting the labels in my datastep statement which will load the data to hadoop from SQL database.

 

/* upload to hadoop with labels */
data &hdfsLibref..&outtable (/*debug optie: logupdate=yes*/ blocksize=64M label="&tableDescr.");
set &_input;
label &label_sql_dataset;
run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1838 views
  • 0 likes
  • 2 in conversation