Skip to content

Commit

Permalink
Update SQL introspection types
Browse files Browse the repository at this point in the history
Datafusion types start with a capital letter:
https://arrow.apache.org/datafusion/user-guide/sql/data_types.html.
  • Loading branch information
tillrohrmann committed Aug 9, 2023
1 parent 7dcfae3 commit 71b5e81
Showing 1 changed file with 26 additions and 26 deletions.
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`. | |

0 comments on commit 71b5e81

Please sign in to comment.