Skip to content

Commit 54e25ce

Browse files
committed
Add computed properties steps using the Data Explorer
1 parent 3f805da commit 54e25ce

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed
22.9 KB
Loading

articles/cosmos-db/nosql/query/computed-properties.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,28 @@ Updating computed properties on an existing container is not supported in Python
225225
> [!TIP]
226226
> Every time you update container properties, the old values are overwritten. If you have existing computed properties and want to add new ones, be sure that you add both new and existing computed properties to the collection.
227227
228-
### Create computed properties using azure data explorer in azure portal
229-
230-
You can create computed properties in azure data explorer in azure portal also.
228+
### Create computed properties by using the Data Explorer
231229

232-
- Click the *Scale & Settings* under the container name.
233-
- Click the *computed properties* tab.
234-
- Create and define the compute property. Below is the sample computed property.
230+
You can use the Data Explorer to create a computed property for a container.
235231

236-
```json
237-
[
238-
{
239-
"name": "cp_lowerName",
240-
"query": "SELECT VALUE LOWER(c.name) FROM c"
241-
}
242-
]
243-
```
244-
- Click *Save* to save the computed property.
232+
1. Open your existing container in the Data Explorer.
233+
234+
1. Navigate to the **Settings** section for you container. Then, navigate to the **Computed Properties* sub-section.
235+
236+
1. Edit the computed properties definition JSON for your container. In this example, this JSON is used to define a computed property to split the `SKU` string for a retail product using the `-` delimeter.
237+
238+
```json
239+
[
240+
{
241+
"name": "cp_splitSku",
242+
"query": "SELECT VALUE StringSplit(p.sku, \"-\") FROM products p"
243+
}
244+
]
245+
```
246+
247+
:::image type="content" source="media/computed-properties/data-explorer.png" alt-text="Screenshot of the computed properties JSON editor in the Data Explorer interface.":::
245248

246-
![create_computed_property_using_data_explorer](https://i.imgur.com/47aQNsw.png)
249+
1. **Save** the computed property.
247250

248251
## Use computed properties in queries
249252

0 commit comments

Comments
 (0)