Background:
I have made a "metadata solution" that serves some main areas/needs in our organization
1. Give business analyst and data scientists etc. overview and fast access to all data and visualisation on our Viya solution
2. show relationship(data lineage) from visualisation(reports/analysis) to CAS tables, Users and data elements(columns)
3. Keep track of report usage, table/files usage and table usage and column changes on cas tables.
4. To be continued....
https://developer.sas.com/apis/rest/Visualization/
The solution uses the rest API and some other SAS function to collect this data a I have built a visual analytics dashboard/report with search option for all metadata elements. To get control over all our business data and insight is something we have been looking for many years now. Finally we are getting somewhere with this problem. I believe many organisations have the same issue.
Question: I am trying to find the report summary/description element in the rest api and data columns that are in use in a report. Has anyone looked into this?
I can list out all kinds of details about a report, graphs, tables, calculated elements, sections, columns available(in datasource) etc. but not summary text or used columns...
Get report content metadata:
PROC HTTP clear_cache METHOD = "GET" oauth_bearer=sas_services OUT = rcontent
URL = "&BASE_URI/reports/reports/&id/content";
HEADERS "Accept" = "application/vnd.sas.report.content+json";
RUN;
The rcontent libname have n number of tables with all kinds of report metadata but still haven´t found what I´m looking for:-)
Hi @ornulfth,
I played around with a basic report I created and was able to locate a few things you may find of interest. Using the 'content' endpoint: /reports/reports/&reportid/content returns an XML file. In the file I see the report summary in the <TextTemplates> section:
<TextTemplates> <TextTemplate type="detail"> <TemplateDefinition> <![CDATA[This report lists the average salary of position players in MLB during the 2008 season.]]> </TemplateDefinition> </TextTemplate> </TextTemplates>
In the <BusinessItems> element, I see the columns used in the report used in the Category, Measure, or Group section:
<BusinessItems> <RelationalDataItem name="bi150" base="bi103"/> <RelationalDataItem name="bi152" base="bi122"/> </BusinessItems>
The "base" parameter corresponds to the DataItem name parameter in the <BusinessItemFolder> section of the <DataSources> element:
<DataSources> <DataSource label="MLB2008" type="relational" name="ds7"> <CasResource server="cas-shared-default" library="CASUSER(jofurb)" table="MLB2008" locale="en_US"/> <BusinessItemFolder> <DataItem name="bi103" xref="POS" usage="categorical"/> <DataItem name="bi122" label="Average SALARY" xref="SALARY" aggregation="average"/> <DataItem name="bi10" xref="3B"/>......
Is that the metadata your searching for? If so, could you parse those values out of the XML?
Join us for SAS Community Trivia
SAS Bowl XLVI, Causal Analysis
Wednesday, December 18, 2024, at 10 a.m. ET | #SASBowl
Hi @ornulfth,
I played around with a basic report I created and was able to locate a few things you may find of interest. Using the 'content' endpoint: /reports/reports/&reportid/content returns an XML file. In the file I see the report summary in the <TextTemplates> section:
<TextTemplates> <TextTemplate type="detail"> <TemplateDefinition> <![CDATA[This report lists the average salary of position players in MLB during the 2008 season.]]> </TemplateDefinition> </TextTemplate> </TextTemplates>
In the <BusinessItems> element, I see the columns used in the report used in the Category, Measure, or Group section:
<BusinessItems> <RelationalDataItem name="bi150" base="bi103"/> <RelationalDataItem name="bi152" base="bi122"/> </BusinessItems>
The "base" parameter corresponds to the DataItem name parameter in the <BusinessItemFolder> section of the <DataSources> element:
<DataSources> <DataSource label="MLB2008" type="relational" name="ds7"> <CasResource server="cas-shared-default" library="CASUSER(jofurb)" table="MLB2008" locale="en_US"/> <BusinessItemFolder> <DataItem name="bi103" xref="POS" usage="categorical"/> <DataItem name="bi122" label="Average SALARY" xref="SALARY" aggregation="average"/> <DataItem name="bi10" xref="3B"/>......
Is that the metadata your searching for? If so, could you parse those values out of the XML?
Join us for SAS Community Trivia
SAS Bowl XLVI, Causal Analysis
Wednesday, December 18, 2024, at 10 a.m. ET | #SASBowl
Hi! Thanks, this was spot on!!! I found it in the table TEXTTEMPLATES_TEMPLATEDEFINITI in the value column:-)
Thanks again!!!😀
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.