microsoft / durabletask-mssql

Microsoft SQL storage provider for Durable Functions and the Durable Task Framework
MIT License
87 stars 32 forks source link

Durable Entities - State Storage Location #67

Closed dustynlightfoot closed 2 years ago

dustynlightfoot commented 2 years ago

Hi,

I'm testing out the new Azure SQL storage provider for Durable Functions, but I can't seem to find a table where the state of my Durable Entities is being persisted?

KR, Dustyn

cgillum commented 2 years ago

You can find entities in the [dt].[Instances] table in your database, just like where you find orchestrations. You'll know it's an entity because the InstanceID value starts with @.

SELECT TOP (10) [TaskHub], [Name], [InstanceID], [CreatedTime], [LastUpdatedTime]
FROM [DurableDB].[dt].[Instances]
WHERE [Name] = 'counter'

image

dustynlightfoot commented 2 years ago

Hey @cgillum ,

Thanks very much for your response. Ah I see now, Instance has an InputPayloadId field which relates to the Payloads table where I can find the current state of the entity in the Text field.

cgillum commented 2 years ago

Ah, yes, sorry, I didn't realize it was the state payload you were looking for, otherwise I would have shared a query that included this. Looks like you found it on your own, though. :)