(Showing Draft Content)

Create a Native Query Dataset

Native Query Dataset is a special dataset which is created by executing a native query on a data source to stream large scale and real-time data as custom visuals on your dashboards and reports. Data in a Native Query Dataset is neither cached nor processed.

Native Query Dataset is a dataset document and supports all the functions of a dataset including Upload, Download, Preview, Import, Export, Revert, and Permission Changes. Also, all types of data sources are supported with Native Query Datasets.

To create a Native Query Dataset, navigate to the Resource Portal and follow the below instructions,

  1. Click the + (Create) icon and then, click the Prepare Data option under Report or Dashboard section.

    Native Query Dataset - Prepare Data

  2. Click the Create button in the Native query Dataset action tile as shown in the below snip.

    Native Query Dataset - Create Dataset

  3. Native Query Dataset Designer window with two tabs - Query and Fields, will appear on your screen. Now, do the following,

    • Query Tab - Under the Query tab, select a data source from the Data Source dropdown. Then, enter a native query in the Query input box and click the Validate button to validate the input query. You can also include parameters to your input query using the Add Parameter button.

      Native Query Dataset Designer Window - Query Tab

      Note: When adding a parameter to a native query, consider the following:

              1. Types of parameters of the query statement should be - user input, user context, and org context.

              2. Data type of parameters of the query statement should include - String, Integer, Float, DateTime, Date, Boolean, Guid.

              3. Parameter must be prefixed with "@".

              4. Parameter names must start with a letter or an underscore and can contain only letters, numbers, or underscore.

              5. In a native query, if there is a need to use the @ symbol to express a non-parameter statement, add "" before the @ symbol.

              6. Parameter can be multi-valued and must have a default value.

    • Fields - Fields tab lists the fields generated based on the results of the input query. The Data Category column is used to give visualization hints related to the attribute type when generating a smart scenario through the Visualization Wizard. Different data types have different possible values. For example, the string data type supports these values: Geography(Country, State/Province, City, District), Image URL, or Image Binary. The numeric data type supports these values: Currency, Geography (Latitude, Longitude). You can add an alias of a field using the Alias column, simply click on a cell and enter an alias.

      Native Query Dataset Designer Window - Fields Tab

    Note: To delete or add a field you have to modify the input query under Query tab and validate the query.

  4. On successful validation of the input query, you can preview the results of the native query by clicking the Preview button on the top-left corner of the Native Query Dataset Designer window.

    Native Query Dataset - Preview Query Output

  5. To save the dataset, click the Save button next to the Preview button, add comments in the dialog box and click the Save button. Native query datasets are saved or exported in the .ndst file format.

    Native Query Dataset - Save

Note the following limitations of Native Query Datasets with dashboards,

  1. Data Binding: While binding data to a native query dataset, data aggregation, quick function, filter, and expression editor (WAX) options are not available.

  2. Action Bar: Filter, Sort, and Conditional Visualization options are not available in the Action Bar.

  3. Context Menu: Keep, Exclude, and Drilldown options are not available in the right-click options.

  4. Cross filters and global filters are not supported with native query datasets.

See the Import help article for information on importing Datasets in the Wyn Enterprise application.