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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.