arcadia_catalog.completed_queries

The completed_queries catalog table has the following structure:

TABLE arcadia_catalog.completed_queries (
   session_id STRING,
   session_type STRING,
   start_time TIMESTAMP,
   end_time TIMESTAMP,
   duration DOUBLE,
   version STRING,
   effective_user STRING,
   connected_user STRING,
   delegated_user STRING,
   network_address STRING,
   default_db STRING,
   coordinator STRING,
   query_id STRING,
   sql_statement STRING,
   query_type STRING,
   query_state STRING,
   query_status STRING,
   query_options STRING,
   num_rows_fetched INT,
   aview_used BOOLEAN,
   rewr_statement STRING,
   base_objects STRING,
   aview_names STRING
 )

The column definitions follow:

session_id

Type: String

The ID of the session that ran this query.

session_type

Type: String

Type of session:

  • HiveServer2
  • beeswax
start_time

Type: Timestamp

Start time of the query.

end_time

Type: Timestamp

End time of the query.

duration

Type: Double

Time elapsed after the query started. For profiles created before Arcadia Enterprise Release 4.2, this value is NULL.

version

Type: String

The version of arcengined (ArcEngine daemon) on which this query ran.

effective_user

Type: String

The user that ran the query. This is typically the most useful user information.

connected_user

Type: String

The user who owns the session.

delegated_user

Type: String

The user that the connected_user is impersonating. This value can be NULL.

network_address

Type: String

The IP address of the specified connected_user.

default_db

Type: String

The database in current use. This is the last database specified by the USE statement.

coordinator

Type: String

The address of the coordinator that planned this query.

query_id

Type: String

The ID of this query.

sql_statement

Type: String

The original SQL statement, as submitted by the user.

query_type

Type: String

Type of the query:

  • DDL
  • SET
  • LOAD
  • QUERY
  • EXPLAIN
  • DML
query_state

Type: String

State of the query:

  • RUNNING
  • FINISHED
  • EXCEPTION
query_status

Type: String

Status of query:

  • Text of the exception
  • OK if no errors
query_options

Type: String

The non-default query options that apply to this query.

num_rows_fetched

Type: Int

The number of rows that the query returns to the client.

aview_used

Type: Boolean

Did the query use an analytical view? For profiles created before Arcadia Enterprise Release 4.2, this value is NULL.

rewr_statement

Type: String

The rewritten query. For profiles created before Arcadia Enterprise Release 4.2, this value is NULL.

base_objects

Type: String

The list of base objects that the original query references.

aview_names

Type: String

Comma-separated list of analytical views that the query uses. For profiles created before Arcadia Enterprise Release 4.2, this value is NULL.