Hi,
Iam hoping for some help, within DI studio I have various External file objects set up, I would like to be able to query all these objects and pull back the column headers. I cannot seem to find any documentation about how to access the External file objects, does anyone have any idea on how this can be done?
Thanks
Tom
In SAS Data Integration Studio External Files are read using the File Reader transformation, this will read out the necessary information and build a DATA Step from it. So usually there is no need to build your own transformation.
If you want to read out this information in your code, then there is the SAS(R) 9.4 Language Interfaces to Metadata.
The Metadata Model is described in the documentation, Information on an External file is here SAS(R) 9.4 Metadata Model: Reference
To query the Metadata Server for information about Metadata Objects, one can use Proc Metadata, or you can use DATA Step functions.
Find below a sample program, that will read out all External File definitions and some information about each column within a file. In order to be able to communicate with a Metadata Server you have to set the appropriate Metadata Server related SAS System Options such as METASERVER, METAUSER, METAPASS, ... If you run the program using SAS Enterprise Guide, you might already have a connection to the Metadata Server
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.