InfluxDB is a time series database used to read and write data at high speed in real time. In this section, you will find information on the following topics,
To create an InfluxDB in Wyn Enterprise, navigate to the Resource Portal and follow the below instructions,
Click the + icon and then, select the Create Data Source option.
Select the InfluxDB option from the data source list on the left or from the icon view under the NoSQL section on the right.
Fill in the database configuration information. The database configuration items are described in the table below. Click the Test Connection button to verify the data source connection. Once the connection is tested and validated, you will receive a notification of a successful connection. Click the Create button to finish.
HostName=myHostname;Port=myPort;username=myUsername;Password=myPassword
* Required fields
InfluxQL language is similar to SQL however, it is used only for API query usage. InfluxQL and Flux are functionally equivalent. Only the codes of both languages look different. See this help article for more information on the parity of InfluxQL and Flux.
Flux is an open-source functional data scripting language. See this help article for more information on Flux language.
The following table lists the InfluxDB data types as compared to the C# data types,
connectionString = "http://localhost:8086?token=myToken&org=myOrg")
Note: The timeout supports ms, s, and m as unit. Default value is in milliseconds.
InfluxDB supports multi-table queries. When the Flux query results in multiple tables, flatten the data to a single table, the same columns will be merged, and the case of no such column in one table will be filled as null.
InfluxDB supports only Native Query Dataset.
Queries in InfluxDB are performed using the Flux language. For example,
a. Insert the following data into the InfluxDB data source,
PointData.Measurement("measurementName") .Tag("location", "west") .Field("value", 55D) .Timestamp(DateTime.UtcNow.AddSeconds(-10), WritePrecision.Ns); PointData.Measurement("measurementName") .Tag("location", "north") .Field("value", 56D) .Timestamp(DateTime.UtcNow.AddSeconds(-10), WritePrecision.Ns); PointData.Measurement("measurementName") .Tag("location", "west") .Field("value", 57D) .Timestamp(DateTime.UtcNow, WritePrecision.Ns); PointData.Measurement("measurementName") .Tag("location", "north") .Field("value", 58D) .Timestamp(DateTime.UtcNow, WritePrecision.Ns);
b. Now run the following query using the Flux statement,
from(bucket: "bucketName") |> range(start: -10m, stop: now()) |> filter(fn: (r) => r._measurement == "measurementName")
c. Above query will result in two tables. However, the end result will be a single table as listed in the Actual Table below. Table 1:
Table 2:
Actual Table:
The following are the main considerations of the above result,
Note the following limitation of InfluxDB,