Skip to content

Commit 1dfb8fe

Browse files
committed
Implement feedback
1 parent b28af23 commit 1dfb8fe

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

articles/digital-twins/concepts-cli.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ Use these special character tips for Bash environments.
7171

7272
#### Queries
7373

74-
In many twin queries, the `$` character is used to reference the `$dtId` property of a twin. When using the [az dt twin query](/cli/azure/dt/twin#az-dt-twin-query) command to query in the Cloud Shell Bash environment, escape the `$` character with a backtick character.
74+
In many twin queries, the `$` character is used to reference the `$dtId` property of a twin. When using the [az dt twin query](/cli/azure/dt/twin#az-dt-twin-query) command to query in the Cloud Shell Bash environment, escape the `$` character with a backslash (`\`).
7575

7676
Here is an example of querying for a twin with a CLI command in the Cloud Shell Bash environment:
7777

7878
```azurecli
79-
az dt twin query -n <instance-name> -q "SELECT * FROM DigitalTwins T Where T.`$dtId = 'room0'"
79+
az dt twin query -n <instance-name> -q "SELECT * FROM DigitalTwins T Where T.\$dtId = 'room0'"
8080
```
8181

8282
### PowerShell
@@ -85,14 +85,17 @@ Use these special character tips for PowerShell environments.
8585

8686
#### Inline JSON
8787

88-
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in the PowerShell environment, escape double quote characters (`"`) inside the JSON with `\`.
88+
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in the PowerShell environment, escape double quote characters (`"`) inside the JSON with a backslash (`\`).
8989

9090
Here is an example of creating a twin with a CLI command in PowerShell:
9191

9292
```azurecli
93-
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties '{\"Temperature\": 0.0,}'
93+
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties '{\"Temperature\": 0.0}'
9494
```
9595

96+
>[!TIP]
97+
>Many of the commands that support inline JSON also support input as a file path, which can help you avoid shell-specific text requirements.
98+
9699
#### Queries
97100

98101
In many twin queries, the `$` character is used to reference the `$dtId` property of a twin. When using the [az dt twin query](/cli/azure/dt/twin#az-dt-twin-query) command to query in a PowerShell environment, escape the `$` character with a backtick character.
@@ -108,14 +111,17 @@ Use these special character tips for the local Windows CMD.
108111

109112
#### Inline JSON
110113

111-
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in a local Windows CMD window, enclose the parameter value with double quotes (`"`) instead of single quotes (`'`), and escape double quote characters inside the JSON with `\`.
114+
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in a local Windows CMD window, enclose the parameter value with double quotes (`"`) instead of single quotes (`'`), and escape double quote characters inside the JSON with a backslash (`\`).
112115

113116
Here is an example of creating a twin with a CLI command in the local Windows CMD:
114117

115118
```azurecli
116-
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties "{\"Temperature\": 0.0,}"
119+
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties "{\"Temperature\": 0.0}"
117120
```
118121

122+
>[!TIP]
123+
>Many of the commands that support inline JSON also support input as a file path, which can help you avoid shell-specific text requirements.
124+
119125
## Next steps
120126

121127
Explore the CLI and its full set of commands through the reference docs:

articles/digital-twins/how-to-ingest-iot-hub-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To create a thermostat-type twin, you'll first need to upload the thermostat [mo
5757
You'll then need to create one twin using this model. Use the following command to create a thermostat twin named thermostat67, and set 0.0 as an initial temperature value.
5858

5959
```azurecli-interactive
60-
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties '{"Temperature": 0.0,}'
60+
az dt twin create --dt-name <instance-name> --dtmi "dtmi:contosocom:DigitalTwins:Thermostat;1" --twin-id thermostat67 --properties '{"Temperature": 0.0}'
6161
```
6262

6363
>[!NOTE]

articles/digital-twins/troubleshoot-error-cli-parse.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ Use the full error message text to help you determine which character is causing
3131

3232
### Solution #2
3333

34-
Not all shells have the same special character requirements, so you can try running the command in a different shell type (some options are the Cloud Shell Bash environment, Cloud Shell PowerShell environment, local Windows CMD, local Bash window, or local PowerShell window).
34+
If you're encountering the parsing issue while passing inline JSON into a command (like [az dt model create](/cli/azure/dt/model#az-dt-model-create) or [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create)), check whether the command allows you to pass in a file instead. Many of the commands that support inline JSON also support input as a file path, which can help you avoid shell-specific text requirements.
35+
36+
### Solution #3
37+
38+
Not all shells have the same special character requirements, so you can try running the command in a different shell type (some options are the [Cloud Shell](https://shell.azure.com) Bash environment, [Cloud Shell](https://shell.azure.com) PowerShell environment, local Windows CMD, local Bash window, or local PowerShell window).
3539

3640
## Next steps
3741

0 commit comments

Comments
 (0)