SQL server

    Dapr doesn’t transform state values while saving and retrieving states. Dapr requires all state store implementations to abide by a certain key format scheme (see Dapr state management spec. You can directly interact with the underlying store to manipulate the state data, such querying states, creating aggregated views and making backups.

    The easiest way to connect to your SQL Server instance is to use the (Windows, macOS, Linux) or SQL Server Management Studio (Windows).

    The above query returns all rows with id containing “myapp||”, which is the prefix of the state keys.

    To get the state data by a key “balance” for the application “myapp”, use the query:

      Then, read the Data field of the returned row.

      To get all state data where the value “color” in json data equals to “blue”, use the query:

      To get all the state keys associated with an actor with the instance ID “leroy” of actor type “cat” belonging to the application with ID “mypets”, use the command:

      And to get a specific actor state such as “food”, use the command:

      Last modified June 23, 2022: