Κοινή χρήση μέσω


az iot ops asset dataset point

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.53.0 or higher). The extension will automatically install the first time you run an az iot ops asset dataset point command. Learn more about extensions.

Manage data-points in an asset dataset.

Commands

Name Description Type Status
az iot ops asset dataset point add

Add a data point to an asset dataset.

Extension GA
az iot ops asset dataset point export

Export data-points in an asset dataset.

Extension GA
az iot ops asset dataset point import

Import data-points in an asset dataset.

Extension GA
az iot ops asset dataset point list

List data-points in an asset dataset.

Extension GA
az iot ops asset dataset point remove

Remove a data point in an asset dataset.

Extension GA

az iot ops asset dataset point add

Add a data point to an asset dataset.

If no datasets exist yet, this will create a new dataset. Currently, only one dataset is supported with the name "default".

az iot ops asset dataset point add --asset
                                   --data-source
                                   --dataset
                                   --name
                                   --resource-group
                                   [--observability-mode]
                                   [--qs]
                                   [--replace {false, true}]
                                   [--sampling-interval]

Examples

Add a data point to an asset.

az iot ops asset dataset point add --asset myasset -g myresourcegroup --dataset default --data-source mydatasource --name data1

Add a data point to an asset with data point name, observability mode, custom queue size, and custom sampling interval.

az iot ops asset dataset point add --asset myasset -g myresourcegroup --dataset default --data-source mydatasource --name data1 --observability-mode log --queue-size 5 --sampling-interval 200

Required Parameters

--asset -a

Asset name.

--data-source --ds

Data source.

--dataset -d

Dataset name.

--name -n

Data point name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--observability-mode --om

Observability mode. Must be none, gauge, counter, histogram, or log.

--qs --queue-size

Custom queue size.

--replace

Replace the data-point if another data-point with the same name is present already.

Accepted values: false, true
--sampling-interval --si

Custom sampling interval (in milliseconds).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset dataset point export

Export data-points in an asset dataset.

The file name will be {asset_name}_{dataset_name}_dataPoints.{file_type}.

az iot ops asset dataset point export --asset
                                      --dataset
                                      --resource-group
                                      [--format {csv, json, yaml}]
                                      [--od]
                                      [--replace {false, true}]

Examples

Export all data-points in an asset in JSON format.

az iot ops asset dataset point export --asset myasset -g myresourcegroup --dataset default

Export all data-points in an asset in CSV format in a specific output directory that can be uploaded via the Digital Operations Experience.

az iot ops asset dataset point export --asset myasset -g myresourcegroup --dataset default --format csv --output-dir myAssetsFiles

Export all data-points in an asset in YAML format. Replace the file if one is present already.

az iot ops asset dataset point export --asset myasset -g myresourcegroup --dataset default --format yaml --replace

Required Parameters

--asset -a

Asset name.

--dataset -d

Dataset name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--format -f

File format.

Accepted values: csv, json, yaml
Default value: json
--od --output-dir

Output directory for exported file.

--replace

Replace the local file if present.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset dataset point import

Import data-points in an asset dataset.

For examples of file formats, please see aka.ms/aziotops-assets.

az iot ops asset dataset point import --asset
                                      --dataset
                                      --if
                                      --resource-group
                                      [--replace {false, true}]

Examples

Import all data-points from a file. These data-points will be appended to the asset dataset's current data-points. Data-points with duplicate names will be ignored.

az iot ops asset dataset point import --asset myasset -g myresourcegroup --dataset default --input-file myasset_default_dataPoints.csv

Import all data-points from a file. These data-points will be appended to the asset dataset's current data-points. Data-points with duplicate names will replace the current asset data-points.

az iot ops asset dataset point import --asset myasset -g myresourcegroup --dataset default --input-file myasset_default_dataPoints.json --replace

Required Parameters

--asset -a

Asset name.

--dataset -d

Dataset name.

--if --input-file

File path for the file containing the data-points. The following file types are supported: json, csv, yaml.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--replace

Replace duplicate asset data-points with those from the file. If false, the file data-points will be ignored. Duplicate asset data-points will be determined by name.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset dataset point list

List data-points in an asset dataset.

az iot ops asset dataset point list --asset
                                    --dataset
                                    --resource-group

Examples

List all points in an asset dataset.

az iot ops asset dataset point list --asset myasset -g myresourcegroup --dataset default

Required Parameters

--asset -a

Asset name.

--dataset -d

Dataset name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset dataset point remove

Remove a data point in an asset dataset.

az iot ops asset dataset point remove --asset
                                      --dataset
                                      --name
                                      --resource-group

Examples

Remove a data point from an asset via the data point name.

az iot ops asset dataset point remove --asset myasset -g myresourcegroup --dataset default --name data1

Required Parameters

--asset -a

Asset name.

--dataset -d

Dataset name.

--name -n

Data point name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.