The "Search" tab of SMC has a nice search function to find all "Deployed Flows" for the current year, which is great for our internal audit purposes. It lists each flow name, type, Last Modified date, and location. The problem is there is no way to right-click-copy the list to Excel or to export this list. We tried exporting to a package - an spk file - which gives a log at the end, but the log does not have all bits of information - it only has flow names. How can we get the data from the search functionality OUT of SMC and into Excel for our auditors?
I added the date by changing the flow data step to pull MetadataCreated as "flow_create" and then convert it to flow_create_num:
/* Create table of flow IDs and Names */
data flows (keep=flow_id flow_name flow_create_num);
length type id flow_uri $ 50 flow_name $ 255 flow_id $ 17 flow_create $ 18 flow_create_num 8;
format flow_create_num datetime18.;
call missing(of _character_);
flow_obj="omsobj:JFJob?@PublicType='DeployedFlow'";
flowcount=metadata_resolve(flow_obj,type,id);
put "NOTE: Found " flowcount "flows.";
if flowcount ge 1 then do i=1 to flowcount;
rc=metadata_getnobj(flow_obj,i,flow_uri);
rc=metadata_getattr(flow_uri,"Name",flow_name);
rc=metadata_getattr(flow_uri,"Id",flow_id);
rc=metadata_getattr(flow_uri,"MetadataCreated",flow_create);
flow_create_num=input(flow_create,datetime18.);
output;
end;
run;
This is fantastic! Thank you. Do you know how I can obtain a listing of all possible variables I could extract? In particular, I am looking for the flow MODIFIED date.
Bravo! Thank you so much. Being able to query metadata means less manual work for my team In complying with our internal auditors. This information is GOLD.
Does anyone know if there is a way to find orphaned jobs? As in jobs that are set up in DI Studio, but are not a part of any Flow in SAS Management Console?
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.