Reporting queries
Use the Reporting queries user interface to create complex queries about your assets and artifacts without the need to use SQL. You can save your queries and share them with other users.
The Reporting queries UI provides a query builder where you can easily formulate queries about your assets and artifacts and then save and run the queries whenever required to view the reports. You can also import and export existing queries with a JSON file, or download the reports in XLS, XLSX, or CSV.
Prerequisites
Before you start building the queries, you first need to configure reporting as described in Setting up reporting.
Building a query
- Go to Governance > Reporting queries.
- Click Create reporting query.
- Select the artifact or asset type you want to run the query for.
- Optionally, define conditions to filter out the results. If you don’t choose any conditions, all the available artifacts or asset types are displayed in the resulting table. You can add up to 6 conditions. Conditions can be grouped.
- Optionally, select which properties you want to display as columns in the resulting table.
- In the Advanced schema settings you can select a schema other than the default schema that was configured for reporting.
- Click Create.
The results of your query are displayed in a table. If you are satisfied with the results, click Save query. You can also modify the query or how the results are presented before you save.
You can use the Export data button to download query results in one of the following formats:
- XLS
- XLSX
- CSV UTF-8
Managing saved queries
When you go to the Reporting queries UI, you see a list of all the queries where you are a collaborator. You can filter the list by the author of the query, date created, and by your collaborator role.
To modify the query itself, click its name and use the right side panel. You can modify the following properties:
- Description
- Conditions
- Collaborators
To modify the view of the results, use the buttons at the top of the table:
- Click the Manage columns button to reorder and rename the columns in your report.
- Click the plus sign to add more columns to the table.
Sharing queries
Queries can be shared with individual users or user groups. Note that the query results might be different for different users, because they depend on user permissions and access. Collaborators can be given one of these roles:
- Editor
- Viewer
To share multiple queries with other users:
- Select the queries that you want to share and click Share.
- Select users and assign a role for each selected user.
- Click Add.
To share an individual query with users or user groups:
- Open the query that you want to share.
- In the side panel Collaborators section click the overflow menu.
- Select Add users or Add user groups.
- Select users or user groups from the list and assign a role for each user.
- Click Add.
Exporting queries
To export your saved queries to a JSON file:
- Select the queries that you want to export.
- Click Export.
- Provide a file name. All selected queries are saved in one file.
- Click Export.
The file is downloaded to your workstation.
Importing queries
You can import one or more queries from a JSON file. The maximum file size is 500 KB. Query names in the file must be unique, otherwise the import fails.
- Click Add reporting query > Import from file.
- Upload the file and click Next.
- Select the schema in the reporting data mart to contain the tables and views of your queries and click Select.
The queries are imported and you can view and edit them in the table.