Skip to content

Commit a856fba

Browse files
authored
Merge pull request #276016 from dominicbetts/aio-influxdb-updates
AIO: Update InfluxDB source stage
2 parents 0763eec + e1f5c6f commit a856fba

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

articles/iot-operations/process-data/howto-configure-datasource-influxdb.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ author: dominicbetts
55
ms.author: dobett
66
ms.subservice: data-processor
77
ms.topic: how-to
8-
ms.date: 02/21/2024
8+
ms.date: 05/22/2024
99

1010
#CustomerIntent: As an operator, I want to configure an InfluxDB source stage so that I can read messages from an InfluxDB database for processing.
1111
---
1212

13-
# Configure an InfluxDB source stage
13+
# Configure an InfluxDB v2 source stage
1414

1515
[!INCLUDE [public-preview-note](../includes/public-preview-note.md)]
1616

17-
The source stage is the first and required stage in an Azure IoT Data Processor (preview) pipeline. The source stage gets data into the data processing pipeline and prepares it for further processing. The InfluxDB source stage lets you read data from an [InfluxDB](https://www.influxdata.com/) database at a user-defined interval.
17+
The source stage is the first and required stage in an Azure IoT Data Processor (preview) pipeline. The source stage gets data into the data processing pipeline and prepares it for further processing. The InfluxDB source stage lets you read data from an [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) database at a user-defined interval.
1818

1919
In the source stage, you define:
2020

21-
- Connection details for InfluxDB.
21+
- Connection details for InfluxDB v2.
2222
- The interval at which to query the InfluxDB database. The stage waits for a result before it resets the interval timer.
2323
- A partitioning configuration based on your specific data processing requirements.
2424

2525
## Prerequisites
2626

2727
- A functioning instance of Data Processor is deployed.
28-
- An InfluxDB database with all necessary raw data available is operational and reachable.
28+
- An InfluxDB database with all necessary raw data is operational and reachable.
2929

3030
## Prepare the Influx database
3131

@@ -39,22 +39,25 @@ To connect to the InfluxDB database, you need to:
3939
To configure the InfluxDB source:
4040

4141
- Provide details of the InfluxDB database. This configuration includes the server name and a query to retrieve the data.
42-
- Specify the authentication method. Currently limited to access token authentication.
42+
- Specify the authentication method. Currently, you can only use access token authentication.
4343

4444
The following table describes the InfluxDB source configuration parameters:
4545

4646
The base schema of the input configuration is made up of:
4747

4848
| Field | Type | Description | Required? | Default | Example |
4949
|--|--|--|--|--|--|
50-
| Data query | Object | The InfluxDB query configuration | Yes | | `{"expression": 'from(bucket:"test-bucket")\|> range(start: -1h) \|> filter(fn: (r) => r._measurement == "stat")'}` |
51-
| Server URL | string | URL of the InfluxDB server | Yes | | `https://contoso.com/some/url/path` |
50+
| Name | String | A customer-visible name for the source stage. | Required | NA | `erp-database` |
51+
| Description | String | A customer-visible description of the source stage. | Optional | NA | `Enterprise database` |
52+
| Database URL | String | URL of the InfluxDB database | Yes | | `https://contoso.com/some/url/path` |
53+
| Database port | Integer | The InfluxDB database port | No | 443 | 443 |
54+
| Organization | String | The organization that holds the bucket to query from | Yes | `test-org` | `test-org` |
55+
| Authentication | Authentication type | The authentication method for connecting to the server. Supports `accessToken` type only. | Yes | `{"type": "accessToken"}` | `{"type": "accessToken"}` |
56+
| Secret | String | Reference to the token stored in Azure Key Vault. | Yes | Yes | `AKV_ACCESS_TOKEN` |
57+
| Flux query | String | The InfluxDB query | Yes | | `{"expression": 'from(bucket:"test-bucket")\|> range(start: -1h) \|> filter(fn: (r) => r._measurement == "stat")'}` |
5258
| Query interval | [Duration](concept-configuration-patterns.md#duration) | String representation of the time to wait before the next API call. | Yes | | `24h` |
53-
| Server port | integer | The InfluxDB server port | No | 443 | 443 |
54-
| Organization | string | The organization that holds the bucket to query from | Yes | `test-org` | `test-org` |
5559
| Data format | [Format](concept-supported-formats.md) | The stage applies the format to individual rows retrieved by the query. Only the `json` format is supported. The top-level `path` isn't supported. | Yes | | `{"type": "json"}` |
5660
| Partitioning | [Partitioning](#configure-partitioning) | Partitioning configuration for the source stage. | Required | NA | See [partitioning](#configure-partitioning) |
57-
| Authentication | Authentication type | The authentication method for connecting to the server. Supports `accessToken` type only. | Yes | `{"type": "accessToken"}` | `{"type": "accessToken"}` |
5861

5962
## Configure partitioning
6063

@@ -76,27 +79,28 @@ The following JSON example shows a complete InfluxDB source stage configuration:
7679

7780
```json
7881
{
79-
"displayName": "influxdb-reader-1",
82+
"displayName": "InfluxDB v2 - ec8750",
8083
"type": "input/influxdbv2@v1",
81-
"next": ["next-stage-id"],
8284
"query": {
83-
"expression": "from(bucket:\"test-bucket\") |> range(start: -1h) |> filter(fn: (r) => r._measurement == \"stat\")"
85+
"expression": "from(bucket:\\\"test-bucket\\\") |> range(start: -1h) |> filter(fn: (r) => r._measurement == \\\"stat\\\")"
8486
},
85-
"interval": "5s",
8687
"url": "https://contoso.com/some/url/path",
88+
"interval": "5s",
89+
"port": 443,
8790
"organization": "test-org",
91+
"format": {
92+
"type": "json"
93+
},
8894
"partitionCount": 1,
8995
"partitionStrategy": {
9096
"type": "id",
9197
"expression": "0"
9298
},
93-
"format": {
94-
"type": "json"
95-
},
9699
"authentication": {
97100
"type": "accessToken",
98101
"accessToken": "AKV_ACCESS_TOKEN"
99-
}
102+
},
103+
"description": "Example InfluxDB source stage"
100104
}
101105
```
102106

articles/iot-operations/process-data/howto-configure-datasource-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following table describes the SQL Server source configuration parameters:
100100
| Server port | Integer | The port number to connect to on the server. | Required | `1433` | `1433` |
101101
| Authentication | Authentication type | The authentication method for connecting to the server. One of: `None`, `Username/Password`, `Managed identity`, or `Service principal`. | Optional | `NA` | `Username/Password` |
102102
| Username/Password > Username | String | The username for the username/password authentication | Yes | NA | `myuser` |
103-
| Username/Password > Secret | Reference to the password stored in Azure Key Vault. | Yes | Yes | `AKV_USERNAME_PASSWORD` |
103+
| Username/Password > Secret | String | Reference to the password stored in Azure Key Vault. | Yes | Yes | `AKV_USERNAME_PASSWORD` |
104104
| Service principal > Tenant ID | String | The Tenant ID of the service principal. | Yes | NA | `<Tenant ID>` |
105105
| Service principal > Client ID | String | The Client ID of the service principal. | Yes | NA | `<Client ID>` |
106106
| Service principal > Secret | String | Reference to the service principal client secret stored in Azure Key Vault. | Yes | NA | `AKV_SERVICE_PRINCIPAL` |

0 commit comments

Comments
 (0)