Azure / Azure/azure-powershell
Stream Analytics Job LastOutputEventTime defaults to JobStartTime if no output event has been processed before
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
**Context**
Currently, Stream Analytics Job `OutputStartMode` can only be set to `LastOutputEventTime` if the event has been processed before. Otherwise, the following error occurs:
`"LastOutputEventTime must be available when OutputStartMode is set to LastOutputEventTime. Please make sure at least one output event has been processed. "`
This means that the user needs to initially set `OutputStartMode` to `JobStartTime` and later to `LastOutputEventTime` if that's the desired behaviour. As a consequence, the config file responsible for deploying ASA job needs to be tweaked after the first deployment which is undesirable in the prod environment.
**Proposed behaviour**
The proposed behaviour is to default to `JobStartTime` when the user has chosen `LastOutputEventTime` setting and no event has been processed before.
**Broken documentation formatting**
Also, [the documentation](https://docs.microsoft.com/en-us/powershell/module/azurerm.streamanalytics/start-azurermstreamanalyticsjob?view=azurermps-6.13.0) is misleading and not properly formatted which may suggest the proposed behaviour:

Contributor guide
Research direction
Start with the Start-AzureRmStreamAnalyticsJob entry point and its OutputStartMode handling. Reproduce the no-output-event case, then verify that LastOutputEventTime uses JobStartTime and that the linked documentation is corrected to describe and format this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100