OData Query

To create a new data set from an existing OData connection, follow the steps below:

  1. If you have not yet configured the database connection, see OData. Then proceed with the steps below.

    If you see the ‘Create Visualization’ dialog box, press the ‘Close’ button close to continue with the steps below (recommended).

    200

    You can also press Create a Query to open the ‘New Data Worksheet’ dialog box, where you can select the query you wish to create. This allows you to skip the ‘Add’ button new objects and proceed to the next steps.

  2. Open the Data Worksheet that will contain the data. (See Create a Data Worksheet or Edit a Data Worksheet.)

  3. Press the ‘Add’ button new objects, and select ‘OData Query’ tabular subquery. This opens the ‘OData Query’ dialog box.

    dataSourceOData5

  4. Select an entity in the ‘Entity’ menu. (To access unbound functions, do not select an entity. See below.)

  5. Optional: Enter a ‘Function’ to query (e.g., GetNearestAirport).

    If you have selected an entity in the ‘Entities’ menu, the ‘Function’ menu lists the available bound functions for the selected entity. If no entity is selected, the menu lists the unbound functions.
  6. Optional: Select ‘Expand Arrays’ to expand a record that contains an array into multiple records.

  7. Enter a comma-separated list in the ‘Select’ field (e.g., “CompanyName, ContactName”) to restrict the columns in the result set to the specified fields. See System Query Option $select in the OData documentation for information about the $select operator.

    dataSourceOData6

  8. Enter a filtering condition (e.g., “City eq 'London'”) in the ‘Filter’ field to restrict the returned records to those that satisfy the condition. See System Query Option $filter in the OData documentation for more information about the $filter operator.

    dataSourceOData7

  9. Enter an expression in the ‘Expand’ field to expand a navigation property. See System Query Option $expand in the OData documentation for more information about the $expand operator.

    A navigation property provides a link between records in different entities. For example, if ‘Orders’ is specified as the ‘Expand’ field when ‘Filter’ is set to “CustomerID eq 'ALFKI'”, this returns all the records in the ‘Orders’ entity for customer ID “ALFKI”.

    dataSourceOData8

  10. Enter a comma-separated list in the ‘Order By’ field (e.g., “ContactTitle,ContactName”) to order the records in the result set based on the specified columns. See System Query Option $orderby in the OData documentation for information about the $orderby operator.

    dataSourceOData9

  11. Enter an integer value in the ‘Top’ field (e.g., “5”, or “0” to suppress filtering) to include only the specified number of initial records in the result set and omit the remaining records from the end of the result set. See System Query Options $top and $skip in the OData documentation for information about the $top operator.

  12. Enter an integer value in the ‘Skip’ field (e.g., “5”, or “0” to suppress filtering) to omit the specified number of initial records from the result set, and return the remaining records from the end of the result set. See System Query Options $top and $skip in the OData documentation for information about the $skip operator.

  13. Optional: If you have more than a one data source of this type defined, you can select an alternate data source from the ‘Data Source’ menu.

  14. Press OK. This creates a new data block in the Data Worksheet.

  15. Optional: Right-click on the data block, and select ‘Properties’ from the context menu. Note: You can also access menu options from the ‘More’ button (menu horizontal) in the mini-toolbar. This opens the ‘Table Properties’ panel. In the ‘Name’ field, enter a name for the data block, and press ‘OK’. (See Modify a Column for information about how to rename columns.

    Names must be unique without respect to case (e.g., "num1" is the same name as "Num1").
  16. Press the ‘Save’ button save in the toolbar to save the Data Worksheet.

You can now do pipeline operations on this data, as described in Prepare Your Data, or you can proceed to create Dashboards based on this Data Worksheet. See Visualize Your Data for information about how to construct a Dashboard.