Querying Data Online


Data Federation service provides a visual interface for developers to query data from various data sources and helps with debugging and analysis.

Prerequisites

  • At least 1 read channel is created and running.

  • The read channel has been authorized to specified applications

Querying Data

Take the following steps to query data with SQL statement from a data source that is bound to a channel:

  1. Log in EnOS Management Console and select Data Federation > Federation Query.

  2. From the Channel and Data Source fields, select the running read channel and the application that is authorized to read data through the selected channel. The data source that is bound to the channel will be displayed.

    _images/selecting_federation_channel.png


    If the federation channel has cross-source analysis function enabled, all the data sources that are bound to the channel will be displayed.

    _images/selecting_federation_channel_1.png
  3. In the query panel on the right, enter SQL statement to query data from the select data source. When entering the SQL statement, you can refer to dynamic syntax hint.

    _images/entering_sql_query.png
  4. Click the Run icon in the tool bar to execute data query.

  5. In the result panel, view the running result of the SQL statement. See the followling example:

    _images/viewing_sql_results.png


    If the federation channel has cross-source analysis function enabled, the system will query data from all the bound data sources with the same SQL statement. See the followling example:

    _images/viewing_sql_results_1.png


For SQL syntax and examples to query data from various data sources, see SQL Statement Samples.

Viewing Data Query History

The data query records will be saved automatically for reference and reuse.

  1. Click Query History to view the SQL query records in the last 3 days, including the query channel, SQL statement, and query time.

    _images/viewing_sql_history.png
  2. In the list of query records, click the Requery icon, the SQL statement will be copied to the query panel. Click Run to execute the data query again.

    _images/rerun_sql_query.png
  3. In the list of query records, click the Add to Collections icon, enter the query name, and click Save to add the query to collections.

    _images/saving_sql_query.png
  4. Click SQL Query Results in the upper right corner of the result panel to view the running result of the latest SQL query.

Manage the Collections

You can use the collections to manage commonly used SQL query conditions.

  1. Click Collections to view all the saved SQL query conditions, including the query channel, SQL statement, and the time when query is added to collections.

    _images/saved_sql_query.png
  2. In the list of saved query conditions, click the Query icon to rerun the SQL query; click the Delete icon to remove a saved query.