How to create and share DQL Queries \ Templates
How To share DQL queries\templates on Connect:
- Login to Symantec Connect community page and mouse-hover on Create Content. From the drop-down, click Download.
- On the Create page, specify a suitable Title that indicates the use-case. Add a description for the content in Body section. In case of an ad-hoc query, paste the verified DQL query in the Body section. In case of a DQL template, zip the verified .template file and attach the zipped file to the post using the File attachment section.
- Under tags, select Storage and Clustering as community, if not already selected
- Select Data Insight as the product, if not already selected.
- Under topics, navigate to Storage and Clustering and choose Report Exchange. You can choose additional relevant tags from the list available.
- Under the group selection option, select Data Insight Report Exchange group to show the post in group listing.
- Complete rest of the form and then click Save to submit.
How to create a DQL Report / DQL Query:
- From the Data Insight Management Console, click on Reports tab. Under the Custom Reports, click DQL Report. The report details page appears.
- Click Create Report. Under the Report Information tab, provide a valid report name and descripton and complete other configurations.
- Click the Query tab. Here you can either select a pre-shipped template for customization or create a fresh DQL query. To know more details about the DQL schema and syntax refer to the Data Insight Programmer's Reference Guide.
- Once you enter the query, complete Notification and Post Processing Action configurations, if required.
- Click Save to save your configuration. Alternatively, click Save and Run if you want to execute the report right away.
Once you successfully generate your custom report, you can verify the actual report outputs against the desired outputs. If you are satisfied with the results you can save your report to be used as a template. Procedure to create a DQL template file is as mentioned below.
How To Create a DQL template file:
- Create a template file with a unique name and .template as extension. Note that the name should be different from the pre-canned templates available under <DATADIR>/templates/dql to avoid over-writing a pre-existing template. By default <DATADIR> refers to C:\DataInsight\data
- Create a text file with the following information on separate lines (Please refer to template attached with this post):
- name: Name of the template depicting the functionality
- desc: Description of the template
- category: Category cab be one of the pre-defined use-cases (Risk Analysis, Data Management, User/Group Management etc.) or anything specific. This will allow categorise templates in DQL wizard.
- version: Major version of Data Insight with which this template is created (e.g 4.0, 4.5)
- query: Tested DQL query
- Once the template file is created, save it in the <DATADIR>/templates/dql folder.
The saved template is available for selection in the Data Insight Management Console when you create a DQL report.
To start with, attached is a DQL template that finds all share level paths without an assigned custodian. After downloading this file, unzip it and place it under <DATADIR>/templates/dql to view it in the 4.5 Data insight UI.