Hyper Historian - SQL Query Engine Quick Start
Hyper Historian - SQL Query Engine Quick Start
Introduction
Hyper Historian logs data to a proprietary (.HHD) file format.
While you can use the TrendWorX64 and TrendWorX32 Viewers
to see and edit your logged data in a graphical format, you may
wish to create reports for the logged data or edit data in bulk.
For this reason, Hyper Historian comes with a SQL Query Engine
Figure 1 - Hyper Historian Provider
that allows you to use common SQL Data Manipulation
Language (DML) queries to retrieve and edit data.
Building SQL Queries
NOTE: For more information on the tables and stored procedures that
can be queried using the Hyper Historian SQL Query Engine, see the In this example, you will use a simple SQL command that reads
Help Files under Hyper Historian → Reporting Options → “SQL Query
Engine Quick Start” and “SQL Query Engine”.
the list of all the tags available in one of the Hyper Historian
Logging Groups. Additionally, you will also create another
simple query to retrieve logged data related to a selected tag.
Hyper Historian Linked Server
To see if the ICONICS Hyper Historian Linked Server is already
present, use the following steps in SQL Server Management
Studio.
NOTE: This example uses the collector group named “Signals” from the
sample Hyper Historian configuration. The display name is “Various
Signals”, but the name of the group is “Signals”.
3. Click the Execute button in the SQL Editor Toolbar. You will
see a result for the query similar to Figure 3.
© 2021 ICONICS, Inc. Page 1 of 5 Hyper Historian - SQL Query Engine Quick Start
Hyper Historian – SQL Query Engine Quick Start
NOTE: If you get no results for the query, you probably have no logged
data. Open Hyper Historian (with the sample configuration) and go into
runtime mode. Then repeat step 3.
SQL Clients – Microsoft Excel Figure 6 - Selecting Hyper Historian SQL Query Engine
The Hyper Historian SQL Query Engine can also be used in other 6. On the Connection properties table, enter the
containers like Microsoft Excel. The following steps describe how “HyperHistorian URL” for a remote Hyper Historian Server
to get Hyper Historian data in Excel. or leave it blank (empty) for local server. Select the Catalog
“!Root” and Schema “!All” and press OK.
1. Open Excel.
2. In the Data tab, click the “From Other Sources” button.
3. Select “From Data Connection Wizard” option.
© 2021 ICONICS, Inc. Page 2 of 5 Hyper Historian - SQL Query Engine Quick Start
Hyper Historian – SQL Query Engine Quick Start
10. The Import Data properties dialog will appear. Click OK,
leaving all the default selections.
Figure 7 - Selecting Hyper Historian Server
NOTE: If you get an error message after clicking OK, check to see if your
version of Microsoft Excel is 32-bit or 64-bit. There are known issues
with Hyper Historian interacting with 64-bit Microsoft Office. Try
installing a 32-bit version of Microsoft Excel and repeat step 6.
© 2021 ICONICS, Inc. Page 3 of 5 Hyper Historian - SQL Query Engine Quick Start
Hyper Historian – SQL Query Engine Quick Start
1. Open Excel, go to the Data ribbon, select Existing Figure 15 - Properties of an Existing Connection
© 2021 ICONICS, Inc. Page 4 of 5 Hyper Historian - SQL Query Engine Quick Start
Hyper Historian – SQL Query Engine Quick Start
1. Open Excel
2. On the Data tab, select Get Data → From Other Sources →
From OLEDB
3. In the new dialog, select the Build button to open the
OLEDB connection string window
4. On the provider tab select ICONICS HyperHistorian SQL
Query Engine
5. Click Next
6. On the Connection properties table, enter the
“HyperHistorian URL” for a remote Hyper Historian Server
or leave it blank (empty) for local server, select the Catalog
“!Root” and Schema “!All” and press OK.
7. In the “From OLE DB” dialog expand Advanced Options and
insert the query below:
NOTE: The time range in this query is in UTC and may need to be
4. Press OK until you return to Excel. Your data table should updated to a more recent time
now show you the History for a single tag.
8. Click OK
9. In the next dialog a preview of the data will show. Now click
on Load and the data will show in the Excel sheet.
© 2021 ICONICS, Inc. Page 5 of 5 Hyper Historian - SQL Query Engine Quick Start