Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restate SQL introspection docs #106

Merged
merged 3 commits into from
Aug 9, 2023
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
52 changes: 26 additions & 26 deletions docs/references/restate-sql-introspection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ The schema of these tables is described in the following.

| Column name | Type | Description | Example |
| ----------------- | ------ |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------- |
| `partition_key` | `uint32` | Internal column that is used for partitioning the services invocations. Can be ignored. | |
| `service` | `utf8` | The name of the invoked service. | `foo.bar.Greeter` |
| `service_key` | `binary` | A binary, uninterpreted representation of the service key. You can use a more specific column based on the type of your key, such as `service_key_utf8` (for string keys), `serivce_key_uuid` for unkeyed services, or `service_key_int32` for integer keys.| |
| `service_key_utf8` | `utf8` | Only contains meaningful values when a service uses a `utf8` Restate key. | `bob` |
| `service_key_int32` | `int32` | Only contains meaningful values when a service uses an `int32` Restate key. | `1337` |
| `service_key_uuid` | `utf8` | Only contains meaningful values for unkeyed Restate services. | `0189bab3b3397d828e979e2548980fa6` |
| `key` | `utf8` | The `utf8` user-supplied state key. | A snippet like `ctx.set(“seen”, 1);` Will produce a value like: `seen` |
| `value` | `binary` | A binary, uninterpreted representation of the value. You can use the more specific column `value_utf8` if the value is a string. | |
| `value_utf8` | `utf8` | Only contains meaningful values when a service stores state as `utf8`. This is the case for Typescript services since the Typescript SDK serializes values as JSON. | `1` |
| `partition_key` | `UInt32` | Internal column that is used for partitioning the services invocations. Can be ignored. | |
| `service` | `Utf8` | The name of the invoked service. | `foo.bar.Greeter` |
| `service_key` | `Binary` | A binary, uninterpreted representation of the service key. You can use a more specific column based on the type of your key, such as `service_key_utf8` (for string keys), `serivce_key_uuid` for unkeyed services, or `service_key_int32` for integer keys.| |
| `service_key_utf8` | `Utf8` | Only contains meaningful values when a service uses a `utf8` Restate key. | `bob` |
| `service_key_int32` | `Int32` | Only contains meaningful values when a service uses an `int32` Restate key. | `1337` |
| `service_key_uuid` | `Utf8` | Only contains meaningful values for unkeyed Restate services. | `0189bab3b3397d828e979e2548980fa6` |
| `key` | `Utf8` | The `utf8` user-supplied state key. | A snippet like `ctx.set(“seen”, 1);` Will produce a value like: `seen` |
| `value` | `Binary` | A binary, uninterpreted representation of the value. You can use the more specific column `value_utf8` if the value is a string. | |
| `value_utf8` | `Utf8` | Only contains meaningful values when a service stores state as `utf8`. This is the case for Typescript services since the Typescript SDK serializes values as JSON. | `1` |

## Table: `sys_status`

| Column name | Type | Description | Example |
| ------------------ | ------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
| `partition_key` | `uint32` | Internal column that is used for partitioning the services invocations. Can be ignored. | |
| `service` | `utf8` | The name for the invoked service. | `foo.bar.Greeter` |
| `method` | `utf8` | The invoked RPC method. | `greet` |
| `service_key` | `binary` | A binary, uninterpreted representation of the service key. You can use a more specific column based on the type of your key, such as `service_key_utf8` (for string keys), `serivce_key_uuid` for unkeyed services, or `service_key_int32` for integer keys.| |
| `service_key_utf8` | `utf8` | Only contains meaningful values when a service uses a `utf8` Restate key. | `bob` |
| `service_key_int32` | `int32` | Only contains meaningful values when a service uses an `int32` Restate key. | `1337` |
| `service_key_uuid` | `utf8` | Only contains meaningful values for unkeyed Restate services. | `0189bab3b3397d828e979e2548980fa6` |
| `status` | `utf8` | Enum value: `invoked` or `suspended`. | |
| `invocation_id` | `utf8` | Restate-generated invocation ID. | `0189baba86ea76b2a0efc37db88ea9a5` |
| `sid` | `utf8` | Service invocation ID, an opaque token that can be used to cancel an invocation of a service with the [admin API](/references/admin-api). | |
| `invoked_by` | `utf8` | Enum describing the invoker of this service: `ingress` = invoked externally / `service` = invoked by a service. | |
| `invoked_by_service` | `utf8` | The name of the invoking service. Or `null` if invoked via the ingress. | `com.example.Greeter` |
| `invoked_by_sid` | `utf8` | The service invocation ID of the service that triggered this invocation. Or `null` if invoked via the ingress. | |
| `trace_id` | `utf8` | The ID of the trace that is assigned to this invocation. Only relevant when tracing is enabled. | |
| `journal_size` | `uint32` | The number of journal entries durably logged for this invocation. | |
| `created_at` | `date64` | Timestamp indicating the start of this invocation. | |
| `modified_at` | `date64` | Timestamp indicating the last state transition. For example, last time the status changed from `invoked` to `suspended`. | |
| `partition_key` | `UInt32` | Internal column that is used for partitioning the services invocations. Can be ignored. | |
| `service` | `Utf8` | The name for the invoked service. | `foo.bar.Greeter` |
| `method` | `Utf8` | The invoked RPC method. | `greet` |
| `service_key` | `Binary` | A binary, uninterpreted representation of the service key. You can use a more specific column based on the type of your key, such as `service_key_utf8` (for string keys), `serivce_key_uuid` for unkeyed services, or `service_key_int32` for integer keys.| |
| `service_key_utf8` | `Utf8` | Only contains meaningful values when a service uses a `utf8` Restate key. | `bob` |
| `service_key_int32` | `Int32` | Only contains meaningful values when a service uses an `int32` Restate key. | `1337` |
| `service_key_uuid` | `Utf8` | Only contains meaningful values for unkeyed Restate services. | `0189bab3b3397d828e979e2548980fa6` |
| `status` | `Utf8` | Enum value: `invoked` or `suspended`. | |
| `invocation_id` | `Utf8` | Restate-generated invocation ID. | `0189baba86ea76b2a0efc37db88ea9a5` |
| `sid` | `Utf8` | Service invocation ID, an opaque token that can be used to cancel an invocation of a service with the [admin API](/references/admin-api). | |
| `invoked_by` | `Utf8` | Enum describing the invoker of this service: `ingress` = invoked externally / `service` = invoked by a service. | |
| `invoked_by_service` | `Utf8` | The name of the invoking service. Or `null` if invoked via the ingress. | `com.example.Greeter` |
| `invoked_by_sid` | `Utf8` | The service invocation ID of the service that triggered this invocation. Or `null` if invoked via the ingress. | |
| `trace_id` | `Utf8` | The ID of the trace that is assigned to this invocation. Only relevant when tracing is enabled. | |
| `journal_size` | `UInt32` | The number of journal entries durably logged for this invocation. | |
| `created_at` | `Date64` | Timestamp indicating the start of this invocation. | |
| `modified_at` | `Date64` | Timestamp indicating the last state transition. For example, last time the status changed from `invoked` to `suspended`. | |
Loading