BookmarkSubscribeRSS Feed

Right now the below code produces CONTENTS output with no variable labels (or, the var names are repeated in the labels, which is about the same).  That's a shame because Teradata has a nice field (and even table) commenting feature that seems to me the exact analogue of SAS' variable labels.


It should be possible to have these labels go into & come back out of the server's metadata tables.


  libname td teradata &td_goo ;

  data with_labels (label = "A nice descriptive label") ;
    x = "Hey" ;
    y = "Ho" ;
    z = "Let's go!" ;

      x = "The first word of the chorus"
      y = "The second word of the chorus"
      z = "The third word of the chorus"
  run ;

  data td.labels_gone ;
    set with_labels ;
  run ;

  proc contents data = td.labels_gone ;
  run ;


Barite | Level 11

Seems like a good idea to me.  I added the "Teradata" tag since that seems relevant.

Fluorite | Level 6

Yes, let's get this done. Let's also advocate a Proc Three-Mode.

Meteorite | Level 14

This should be a general SAS/ACCESS libname/dataset option. Column comments or similar are not unique to Teradata.

I suggest some value for the DBSASLABEL option which generally retrieves the column comment (if applicable) into the SAS label, and a new option, which could be called DBLABEL, which could be set to e.g. NAME (the SAS variable name is put into the column comment), LABEL (the SAS label is put into the column comment), or NONE (no column comment).