Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions data-explorer/kusto/query/toscalar-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,62 @@ _dataset1
|3|4|
|5|6|

### Additional mitigation patterns for real-world scenarios

In many practical scenarios, you may want to compute a scalar value per row using
an expression that performs its own aggregation, such as:

```kusto
| extend result = toscalar(T | where Key == key | summarize max(Value))
```

This pattern fails because `toscalar()` cannot be evaluated once per row.
Use one of the supported mitigation patterns below.

1. Pre-aggregate the data once and then join the aggregated results back to the main table for improved efficiency.

```kusto
let summary =
T
| summarize maxValue = max(Value) by Key;

Dataset1
| join kind=leftouter summary on Key
| project Key, maxValue
```

2. Use `arg_max()` to retrieve the row with the highest value. This is useful when you need both the maximum value and the associated columns.

```kusto
let summary =
T
| summarize arg_max(Timestamp, *) by Key;

Dataset1
| lookup summary on Key
```

3. Use a `lookup` for key/value mappings to avoid row-context violations and ensure efficient dimension-table lookups.

```kusto
let lookupTable =
T | summarize maxValue = max(Value) by Key;

Dataset1
| lookup lookupTable on Key
```

4. Use window functions or `make-series` for time-window aggregations

```kusto
Dataset1
| make-series maxValue = max(Value)
on Timestamp
from ago(1h) to now()
step 1m
by Key
```

## Examples

The examples in this section show how to use the syntax to help you get started.
Expand Down
42 changes: 42 additions & 0 deletions data-explorer/web-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,48 @@ To sync your profile data, follow these steps:
>[!NOTE]
> If the status doesn't display as expected, ensure that you're logged into the same account used for syncing.

## Turn sync off

If you enabled sync and want to stop syncing your Azure Data Explorer web UI profile, follow these steps:

1. In the tab bar, select **Sync on**.
2. In the dialog box, select **Turn sync off**.
3. Confirm the action when prompted.

### Important notes when turning sync off
- Turning sync off **stops updating cloud data**, but the cloud profile previously uploaded is **not deleted**.
- Your existing cloud profile remains the version that other browsers use when sync is turned on again.
- Local browser data will no longer be uploaded or overwritten.

## Turn sync back on

If sync was previously disabled:

1. In the tab bar, select **Sync off**.
2. Select **Turn sync on**.
3. Confirm that the browser you are enabling sync on contains the state you want to upload as the cloud profile.

> [!WARNING]
> When you turn sync back on, **this browser becomes the primary source again** and will overwrite cloud-stored data.

## Determine the primary source of sync data

The primary sync source is the **first browser/device where sync was turned on**.
This browser uploads its current tabs, settings, and connections to the cloud.

To check which environment is used as the primary source:

- Open the browser where sync is currently enabled.
- Verify that **Sync on** appears in the tab bar.
- Compare this browser’s state with what you see on other devices.
If other devices match this one, it is the current primary source.

If you want to change the primary source:

1. Turn sync **off**.
2. Open the browser that contains the data you want to use as the new primary environment.
3. Turn sync **back on** on that browser.

## Related content

* [Azure Data Explorer web UI query overview](web-ui-query-overview.md)
Expand Down