[Cosmos DB Trigger] Null _ts, _etag etc. properties from IReadOnlyList parameters.
See original GitHub issueHi,
It appears that I can’t read _ts, _etag etc. properties from the change feed, even though I have them set in my entity like so:
[JsonConverter(typeof(UnixDateTimeConverter))]
[JsonProperty("_ts")]
public DateTime? LastModified {get;set;}
[JsonProperty("_etag")]
public string? Etag {get;set;}
I need this properties for processing my dead letter queue.
Thanks
Edit: This started working when I switch to the system text json custom serializer.
Issue Analytics
- State:
- Created a year ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Azure Function App CosmosDbTrigger Gives Null ...
Running the Function manually works for things like HttpTrigger. The error you are seeing is because, when you use the Run in the...
Read more >TriggerProperties.ETag Property
Gets the entity tag associated with the resource from the Azure Cosmos DB service. C# Copy. [Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.
Read more >Troubleshoot issues with the Azure Functions trigger for ...
This error means that one or both of the Azure Cosmos DB containers that are required for the trigger to work either: Don't...
Read more >functions-bindings-cosmosdb-v2-trigger.md
Learn to use the Azure Cosmos DB trigger in Azure Functions. reference ... true)]IReadOnlyList<ToDoItem> input, ILogger log) { if (input != null &&...
Read more >Azure Cosmos DB bindings for Functions 1.x
This binding was originally named DocumentDB. In Azure Functions version 1.x, only the trigger was renamed Azure Cosmos DB; the input binding, output...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The 2 Nugets I mention are the ones I authored, I’m not sure what the Worker version of the Nuget includes (the Dependencies section is empty) but looking at the Versions, it’s a mirror with the other ones.
So assuming that, it should work the same way (3.X uses the V2 SDK and
Document
, 4.X uses V3 SDK and can use your custom<T>
), but since I didn’t author or work on those, I cannot confirm.@Ved2806 - I cannot comment on the Worker packages as I don’t know who authored them or what they contain. I tried to repro the scenario with the packages we author and the scenario is simply not possible (using
Entity
instead ofDocument
with version 3.0.9). Whoever owns the Worker packages might be able to comment on what do they actually include and work.This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.