Querying Data Archived in Blob¶
This tutorial guides you through querying asset history data that is archived in Blob with a Data Federation read channel.
Prerequisites¶
You are authorized to use the Data Federation and Data Archiving modules.
Your organization has requested for the Data Federation and Data Archiving resources.
Connected devices have been uploading data to EnOS Cloud.
The Blob data source is registered through Data Source Registration.
Procedure¶
This tutorial walks you through a typical path of querying asset history data that is archived in Blob, which is:
Creating a data archiving job to archive asset data to the Blob storage
Creating a data federation read channel for binding the Blob data source
Authorizing an SA to access data with the data federation channel and starting the channel
Querying and analyzing archived data stored in the Blob storage with the data federation channel
Scenario¶
The scenario of this tutorial is archiving the real-time data of an asset (asset ID VmpNv9KO
) to an external Blob storage and querying the archived data with a data federation read channel.
Creating a Data Archiving Job¶
Take the following steps to create a data archiving job for the asset real-time data.
Complete the basic information and storage configuration of the data archiving job.
Set the archiving cycle and select
All Models
for the content configuration.On the Device Asset management page, verify that the measurement points of the
VmpNv9KO
asset are uploading data to EnOS Cloud.
Creating a Data Federation Channel¶
Take the following steps to create a data federation channel and bind the Blob data source.
Create a data federation read channel.
Add the registered Blob data source.
Querying Archived Data in the Blob Storage¶
Take the following steps to query and analyze archived asset data in the Blob storage.
When the data federation channel is running, view the schema and files of the Blob storage with the Federation Query function.
Find the archived file. For example, the path of the archived file is:
/dataconnector/beta/real/20200925/12/real_20200925T1200_zqAzIf.csv
.Enter the following SQL statement in the editor:
SELECT * FROM dataconnector002.qatest.`/dataconnector/beta/real/20200925/12/real_20200925T1200_zqAzIf.csv`
View the data querying results. For example: