steampipecloud_audit_logsteampipecloud_connectionsteampipecloud_organizationsteampipecloud_organization_membersteampipecloud_organization_workspace_membersteampipecloud_processsteampipecloud_tokensteampipecloud_usersteampipecloud_user_emailsteampipecloud_user_preferencessteampipecloud_workspacesteampipecloud_workspace_aggregatorsteampipecloud_workspace_connectionsteampipecloud_workspace_db_logsteampipecloud_workspace_modsteampipecloud_workspace_mod_variablesteampipecloud_workspace_pipelinesteampipecloud_workspace_processsteampipecloud_workspace_snapshot
Table: steampipecloud_workspace_db_log
Database logs records the underlying queries executed when a user executes a query.
Examples
List db logs for an actor by handle
select id, workspace_id, workspace_handle, duration, query, log_timestampfrom steampipecloud_workspace_db_logwhere actor_handle = 'siddharthaturbot';
List db logs for an actor by handle in a particular workspace
select id, workspace_id, workspace_handle, duration, query, log_timestampfrom steampipecloud_workspace_db_logwhere actor_handle = 'siddharthaturbot' and workspace_handle = 'dev';
List queries that took more than 30 seconds to execute
select id, workspace_id, workspace_handle, duration, query, log_timestampfrom steampipecloud_workspace_db_logwhere duration > 30000;
List all queries that ran in my workspace in the last hour
select id, workspace_id, workspace_handle, duration, query, log_timestampfrom steampipecloud_workspace_db_logwhere workspace_handle = 'dev' and log_timestamp > now() - interval '1 hr';
Schema for steampipecloud_workspace_db_log
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
actor_avatar_url | text | The avatar of the user who executed the query. | |
actor_display_name | text | The display name of the user who executed the query. | |
actor_handle | text | The handle of the user who executed the query. | |
actor_id | text | The unique identifier for the user who executed the query. | |
created_at | text | The time when the db log record was generated. | |
duration | double precision | The duration of the query in milliseconds(ms). | |
id | text | The unique identifier for a db log. | |
log_timestamp | timestamp with time zone | The time when the log got captured in postgres. | |
query | text | The query that was executed in the workspace. | |
workspace_handle | text | The handle of the workspace on which the query was executed. | |
workspace_id | text | The unique identifier of the workspace on which the query was executed. |