Audit Data Dictionary
This appendix describes the tables and columns in Posit Workbench’s audit database. Note that this database is under active development; the schema and columns may change between releases of Posit Workbench. The most stable way to access this data is via the Workbench API.
The fields which have the Integer/Boolean
field are Integer
type if SQLite is used and Boolean
type if PostgreSQL is used, due to differences in the two database systems.
Jobs
The jobs
table tracks historical jobs and their metadata. A single job entry correlate 1:1 with an entry in the sessions
table below. Most of the metadata and terms in this table are defined by the Job Launcher API documentation.
Column Name | Type | Can be Null | Description |
---|---|---|---|
job_key⁕ | Integer | No | Auto-incrementing primary key for the jobs table. |
id | Text | No | Job identifier from the job launcher. |
cluster | Text | Yes | Cluster identifier. |
name | Text | Yes | Job name. |
licensed_user_key† | Integer | No | Identifies the row in the internal database’s licensed_users table that the job was associated with. |
groupname | Text | Yes | Group for the job. |
queues | Text | Yes | Queues as JSON array. |
working_directory | Text | Yes | Working directory. |
container_image | Text | Yes | Name of the container image. |
init_container_image | Text | Yes | Init container image name. |
host | Text | Yes | Host where job runs. |
placement_constraints | Text | Yes | Placement constraints as JSON array. |
mounts | Text | Yes | Mounts as JSON array. |
config | Text | Yes | Job configuration as JSON array. Any additional job configuration that only applies to the type of the requested cluster. |
resource_limits | Text | Yes | Resource limits as JSON array. |
status | Text | No | Current job status. Maps to Status struct in server/job_launcher/Job.hpp. One of: Suspended, Failed, Finished, Killed, Canceled. |
status_message | Text | Yes | Status message. |
status_code | Text | Yes | Status code. |
exit_code | Integer | No | Exit code of the job. |
created_timestamp | Text | No | Time at which the job was first created. ISO-8601. |
running_timestamp | Text | Yes | Time at which the job changed to the running state. ISO-8601. |
terminated_timestamp† | Text | No | Time at which the job changed to a terminated state. ISO-8601. |
last_state_updated_timestamp | Text | No | Time at which the last job state updated. ISO-8601. |
command | Text | Yes | Command to run within the job. Only one of command or exe should be specified. |
exe | Text | Yes | Executable to run within the job. Only one of command or exe should be specified. |
args | Text | Yes | Arguments passed to the command or executable, as JSON array. |
stdin | Text | Yes | Data that was written to the stdin stream of the job when its process launched. |
tags | Text | Yes | Tags applied to this job, as JSON array. |
environment | Text | Yes | Environment variables defined for the job’s runtime environment, (name, value) pairs as JSON array. |
submission_timestamp | Text | Yes | Submission time. ISO-8601. |
metadata | Text | Yes | Arbitrary JSON which can be stored with the job. Used by some plugins to provide additional functionality. Currently only available to the Kubernetes plugin. |
resource_profile | Text | Yes | Resource profile. |
instance_id | Text | Yes | Launcher instance ID. |
⁕ Primary Key † Indexed Column
Sessions
The sessions
table stores metadata about sessions. A single session entry correlate 1:1 with an entry in the jobs
table above. The majority of the content of this table comes from the active session metadata used by RStudio sessions.
Column Name | Type | Can be Null | Description |
---|---|---|---|
session_key⁕ | Integer | No | Auto-incrementing primary key for the sessions table. |
id | Text | No | Session ID for the session which this row describes. |
job_fk‡ | Integer | No | Foreign key to jobs table (references job_key). |
workbench | Text | No | Type of workbench for this session. One of RStudio, VS Code, Positron, or Jupyterlab |
last_used_timestamp | Text | No | Time at which this session was last used. ISO-8601. |
r_version | Text | Yes | Version of R in use, if this session’s workbench type is R. |
r_version_label | Text | Yes | Label of the version of R in use, if this session’s workbench type is R. |
r_version_home | Text | Yes | R home of the version of R in use, if this session’s workbench type is R. |
project | Text | Yes | Open project, if any. |
label | Text | No | Display label for this session. |
is_save_prompt_required | Text | Yes | Whether or not a save prompt is required. 1 or 0 as text. |
is_executing | Text | Yes | Whether the session is currently executing R code. 1 or 0 as TEXT. |
is_running | Text | Yes | Whether the session is currently running. 1 or 0 as TEXT. |
is_initial | Text | Yes | Whether or not this is the initial run for the session. 1 or 0 as TEXT. |
last_resumed_timestamp | Text | Yes | Time at which the session was last resumed.ISO-8601. |
blocking_suspend | Text | Yes | List of actions which are blocking the suspension of the session, if any. |
suspend_timestamp | Text | Yes | Time at which the session suspended. ISO-8601. |
⁕ Primary Key ‡ Foreign Key