As we discussed in previous chapters, when using the Dewesoft Historian Client plugin, our data bypasses the database, flowing directly from the publisher, through the broker, to the subscriber. As we continued learning about Grafana, we realized that, in addition to this direct flow, there is another connection simultaneously running that saves our real-time data into the database. This stored data is then retrieved by Grafana for web-based analysis and visualization.
Using the Grafana web client, we can perform basic analysis of our measurements. For more advanced analysis, DewesoftX's Analyze mode provides an extensive set of tools. Since our measurements are stored in a database, the Historian Importer enables us to retrieve this data and convert it into the native .dxd format. Once the data is imported locally into DewesoftX, we can leverage all of its advanced analysis features for thorough and comprehensive examination.
To access the database, you need to know the URL or IP location of the database. To try the Dewesoft Historian importer, you can use https://historian.dewesoft.com:8082.
If you plan to fetch data from your local server (refer to the Server section of this training), ensure that you have already published some measurements that were saved into the database. Otherwise, the Historian Importer won’t be able to find any data to fetch, as there would be none stored yet.
To import data using the Historian Importer, DewesoftX needs to be in Analyze Mode. Click on the Import icon to open the drop-down menu. Select Historian Importer.
After selecting the Historian Importer, the Historian Importer window will appear. In this window, you will find various importing options to configure and manage your data import process.
The most crucial configurations involve selecting the appropriate database address and ensuring a successful connection.
- Public Historian Server: Set the server to "https://historian.dewesoft.com:8082" to connect to the public Historian server database.
- Local Historian Server (Docker): If you're running Docker locally, set the server to "https://localhost:8082" to connect to your local Historian server database.
Once the address is set, additional configurations include:
- Status: After entering the Historian server IP and clicking Connect, green "OK" letters will appear if the connection to the database is successful.
- Start time: Select the start time and date of the data you want to import.
- End time: Select the end time and date of the data you want to import.
- API key: You may also set an API key for authentication if required by your server. Ensure that you have the correct API key to access the database.
After configuring the Importing options select the channels you'd like to import from the database. This can be found in the table below the Importing options. The table contains the name, rate, data structure and data type of all the channels stored in the database.
After selecting the channel you would like to import, the Start time will automatically update to the time when the acquisition of that channel began. This helps ensure you're retrieving data from the correct time period for the selected channel.
After selecting the channels you'd like to import, click on the Import button. A new data file containing the data from the selected channels will be created. After importing, Analyze Mode should automatically open. If this doesn't happen, you can manually view and open your imported files by navigating to the Data Files section, where all your .dxd files are stored, and selecting the imported file. By default, Historian imported files are saved under the name "Historian Importer."
Congratulations! You’ve successfully used the Historian Importer to fetch the selected channel data from the database. While data analysis is beyond the scope of this training, we strongly recommend checking out our Data Analysis Training for a deeper dive into analyzing your imported data.