Creating a Handler for Data Sources in Data Cube

After you connect to a data source in Data Cube, you can create request handlers that will return specific pieces of data from your data sources. You can use handlers to create custom search interfaces using your data sources in your own applications.

After you create a data source and import data into Data Cube, a default handler is automatically created for the data source. The default handler query will return all of the data from the data source. You can follow this procedure to create multiple, custom handlers for different needs.

Before You Begin

You must crawl the data source. See Crawling Data Connections.

Procedure

  1. In a Web browser, log in to the Web Console and then click Analytics.

  2. In the left pane, click the connector group to view the data sources for that connector.

  3. On the Data Sources (connector) page, in the box of the data source that you want to use, click the name of the data source.

  4. In the upper right of the page, click Handlers.

  5. In the upper right of the page, click Create New Handler.

  6. In the New Handler page, in the Name box, enter the name of the new handler.

  7. On the New Handler page, complete the remaining options for the parameters to include in the handler query:

    • In Default Search Field, enter the name of the default data field that you want use for searching the data. If you leave Default Search Field blank, all of the data fields will be included for searches.

    • In Default Search Keyword, enter a default query to return only matching data in the response. You can include wildcard patterns in your keyword query.

    • Click the Column Names list and select one or more data fields from the data source that you want to return in the response.

      Note

      Unless Override is selected, some system-generated fields are also included in the response.

    • In Filter Criteria, enter an conditional statement (using AND, OR, NOT) to filter the data in the response by specific data fields and values.

    • In Sort By, enter the data field name that you want to use to sort the response. Then enter asc to sort the data in ascending order (numbers arranged from smallest to largest and letters in alphabetical order) or desc to sort the data in descending order (numbers arranged from largest to smallest and letters in reverse alphabetical order). Separate multiple sorting statements with a comma.

  8. To enable faceting on data fields in the response, do the following:

    1. Select the Facet check box.

    2. In Facets Field, enter the name of the data field that you want to use to add facet categories to the handler.

    3. To add more facets, click the add button.

  9. If facets are enabled and you want to override the default facet counts that are created for each facet in the response, in Facets Query, enter the query that you want to use to create facet counts.

    For more information, see Data Cube Handler Options.

  10. To view additional options for the handler, click Additional Criteria:

    • In Count, enter the maximum number of results that you want to include in the response.

    • Click the Response Type list and select a format for the response.

    • To include additional parameter-value pairs, in Raw Query enter the parameter and values as parameter=value. You can enter multiple Raw Queries.

      Note

      Raw Query values will override most values for parameters included in the handler form. If the handler form parameter can have multiple entries, such as Filter Criteria, then the Raw Query values will be appended to the parameter in the handler form.

    For more information about handler query options, see Data Cube Handler Options.

  11. For each handler option that you want to include in the handler query, select a priority level for the option in terms of any additional parameter that will be included in the response:

    • Default: The default parameters for the handler. These values will be overridden if the same parameters are present in the request.

    • Append: These values will be appended to any values specified in the request.

    • Override: These parameters will be used in spite of any values provided in the request.

      Note

      If you do not select a priority option for a parameter option, then that parameter will not be included in the handler query.

To create a report for the handler to view the response data in a more user-friendly format, see Creating a Report for a Data Source Handler.

Editing Data Cube Handler Configurations

Viewing Handler Response Data in Data Cube

Loading...