Define "business key".
Technically, you can't do it without the SAS system accessing the dataset(s), as (e.g.) using dictionary.columns forces SAS to read the dataset header.
But from within SAS, using dictionary.columns to search for variables that satisfy certain conditions is the way to go.
Depends on what you consider a 'business key'?
@David_Billa wrote:
Is there a way to identify the business keys of a SAS dataset without opening it?
That's about "know your data". Especially when doing ETL/DIS you need to know upfront how your source data structures look like, what can be missing or not, which columns make up keys.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.