BigQueryAuditMetadata

Stay organized with collections Save and categorize content based on your preferences.

BigQueryAuditMetaData is exposed as part of the new AuditData.metadata messages.

JSON representation
{
  "firstPartyAppMetadata": {
    object (BigQueryAuditMetadata.FirstPartyAppMetadata)
  },

  // Union field event can be only one of the following:
  "jobInsertion": {
    object (BigQueryAuditMetadata.JobInsertion)
  },
  "jobChange": {
    object (BigQueryAuditMetadata.JobChange)
  },
  "jobDeletion": {
    object (BigQueryAuditMetadata.JobDeletion)
  },
  "datasetCreation": {
    object (BigQueryAuditMetadata.DatasetCreation)
  },
  "datasetChange": {
    object (BigQueryAuditMetadata.DatasetChange)
  },
  "datasetDeletion": {
    object (BigQueryAuditMetadata.DatasetDeletion)
  },
  "tableCreation": {
    object (BigQueryAuditMetadata.TableCreation)
  },
  "tableChange": {
    object (BigQueryAuditMetadata.TableChange)
  },
  "tableDeletion": {
    object (BigQueryAuditMetadata.TableDeletion)
  },
  "tableDataRead": {
    object (BigQueryAuditMetadata.TableDataRead)
  },
  "tableDataChange": {
    object (BigQueryAuditMetadata.TableDataChange)
  },
  "modelDeletion": {
    object (BigQueryAuditMetadata.ModelDeletion)
  },
  "modelCreation": {
    object (BigQueryAuditMetadata.ModelCreation)
  },
  "modelMetadataChange": {
    object (BigQueryAuditMetadata.ModelMetadataChange)
  },
  "modelDataChange": {
    object (BigQueryAuditMetadata.ModelDataChange)
  },
  "modelDataRead": {
    object (BigQueryAuditMetadata.ModelDataRead)
  },
  "routineCreation": {
    object (BigQueryAuditMetadata.RoutineCreation)
  },
  "routineChange": {
    object (BigQueryAuditMetadata.RoutineChange)
  },
  "routineDeletion": {
    object (BigQueryAuditMetadata.RoutineDeletion)
  },
  "rowAccessPolicyCreation": {
    object (BigQueryAuditMetadata.RowAccessPolicyCreation)
  },
  "rowAccessPolicyChange": {
    object (BigQueryAuditMetadata.RowAccessPolicyChange)
  },
  "rowAccessPolicyDeletion": {
    object (BigQueryAuditMetadata.RowAccessPolicyDeletion)
  }
  // End of list of possible types for union field event.
}
Fields
firstPartyAppMetadata

object (BigQueryAuditMetadata.FirstPartyAppMetadata)

First party (Google) application specific metadata.

Union field event. BigQuery event information. event can be only one of the following:
jobInsertion

object (BigQueryAuditMetadata.JobInsertion)

Job insertion event.

jobChange

object (BigQueryAuditMetadata.JobChange)

Job state change event.

jobDeletion

object (BigQueryAuditMetadata.JobDeletion)

Job deletion event.

datasetCreation

object (BigQueryAuditMetadata.DatasetCreation)

Dataset creation event.

datasetChange

object (BigQueryAuditMetadata.DatasetChange)

Dataset change event.

datasetDeletion

object (BigQueryAuditMetadata.DatasetDeletion)

Dataset deletion event.

tableCreation

object (BigQueryAuditMetadata.TableCreation)

Table creation event.

tableChange

object (BigQueryAuditMetadata.TableChange)

Table metadata change event.

tableDeletion

object (BigQueryAuditMetadata.TableDeletion)

Table deletion event.

tableDataRead

object (BigQueryAuditMetadata.TableDataRead)

Table data read event.

tableDataChange

object (BigQueryAuditMetadata.TableDataChange)

Table data change event.

modelDeletion

object (BigQueryAuditMetadata.ModelDeletion)

Model deletion event.

modelCreation

object (BigQueryAuditMetadata.ModelCreation)

Model creation event.

modelMetadataChange

object (BigQueryAuditMetadata.ModelMetadataChange)

Model metadata change event.

modelDataChange

object (BigQueryAuditMetadata.ModelDataChange)

Model data change event.

modelDataRead

object (BigQueryAuditMetadata.ModelDataRead)

Model data read event.

routineCreation

object (BigQueryAuditMetadata.RoutineCreation)

Routine creation event.

routineChange

object (BigQueryAuditMetadata.RoutineChange)

Routine change event.

routineDeletion

object (BigQueryAuditMetadata.RoutineDeletion)

Routine deletion event.

rowAccessPolicyCreation

object (BigQueryAuditMetadata.RowAccessPolicyCreation)

Row access policy create event.

rowAccessPolicyChange

object (BigQueryAuditMetadata.RowAccessPolicyChange)

Row access policy change event.

rowAccessPolicyDeletion

object (BigQueryAuditMetadata.RowAccessPolicyDeletion)

Row access policy deletion event.

BigQueryAuditMetadata.JobInsertion

Job insertion event.

JSON representation
{
  "job": {
    object (BigQueryAuditMetadata.Job)
  },
  "reason": enum (BigQueryAuditMetadata.JobInsertion.Reason)
}
Fields
job

object (BigQueryAuditMetadata.Job)

Job metadata.

reason

enum (BigQueryAuditMetadata.JobInsertion.Reason)

Describes how the job was inserted.

BigQueryAuditMetadata.Job

BigQuery job.

JSON representation
{
  "jobName": string,
  "jobConfig": {
    object (BigQueryAuditMetadata.JobConfig)
  },
  "jobStatus": {
    object (BigQueryAuditMetadata.JobStatus)
  },
  "jobStats": {
    object (BigQueryAuditMetadata.JobStats)
  }
}
Fields
jobName

string

Job URI.

Format: projects/<projectId>/jobs/<jobId>.

jobConfig

object (BigQueryAuditMetadata.JobConfig)

Job configuration.

jobStatus

object (BigQueryAuditMetadata.JobStatus)

Job status.

jobStats

object (BigQueryAuditMetadata.JobStats)

Job statistics.

BigQueryAuditMetadata.JobConfig

Job configuration. See the Jobs API resource for more details on individual fields.

JSON representation
{
  "type": enum (BigQueryAuditMetadata.JobConfig.Type),
  "labels": {
    string: string,
    ...
  },

  // Union field config can be only one of the following:
  "queryConfig": {
    object (BigQueryAuditMetadata.JobConfig.Query)
  },
  "loadConfig": {
    object (BigQueryAuditMetadata.JobConfig.Load)
  },
  "extractConfig": {
    object (BigQueryAuditMetadata.JobConfig.Extract)
  },
  "tableCopyConfig": {
    object (BigQueryAuditMetadata.JobConfig.TableCopy)
  }
  // End of list of possible types for union field config.
}
Fields
type

enum (BigQueryAuditMetadata.JobConfig.Type)

Job type.

labels

map (key: string, value: string)

Labels provided for the job.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Union field config. Job configuration information. config can be only one of the following:
queryConfig

object (BigQueryAuditMetadata.JobConfig.Query)

Query job information.

loadConfig

object (BigQueryAuditMetadata.JobConfig.Load)

Load job information.

extractConfig

object (BigQueryAuditMetadata.JobConfig.Extract)

Extract job information.

tableCopyConfig

object (BigQueryAuditMetadata.JobConfig.TableCopy)

TableCopy job information.

BigQueryAuditMetadata.JobConfig.Query

Query job configuration.

JSON representation
{
  "query": string,
  "queryTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "defaultDataset": string,
  "tableDefinitions": [
    {
      object (BigQueryAuditMetadata.TableDefinition)
    }
  ],
  "priority": enum (BigQueryAuditMetadata.JobConfig.Query.Priority),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  },
  "statementType": enum (BigQueryAuditMetadata.QueryStatementType)
}
Fields
query

string

The SQL query to run. Truncated if exceeds 50K.

queryTruncated

boolean

True if the query field was truncated.

destinationTable

string

The destination table for the query results.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

defaultDataset

string

Default dataset for the query.

tableDefinitions[]

object (BigQueryAuditMetadata.TableDefinition)

External data sources used in the query.

priority

enum (BigQueryAuditMetadata.JobConfig.Query.Priority)

Priority given to the query.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

statementType

enum (BigQueryAuditMetadata.QueryStatementType)

Type of the query.

BigQueryAuditMetadata.TableDefinition

Definition of an external data source used in a query.

JSON representation
{
  "name": string,
  "sourceUris": [
    string
  ]
}
Fields
name

string

Name of the table, used in queries.

sourceUris[]

string

URIs for the data.

BigQueryAuditMetadata.EncryptionInfo

Encryption properties for a table or a job

JSON representation
{
  "kmsKeyName": string
}
Fields
kmsKeyName

string

Cloud kms key identifier.

Format: projects/<projectId>/locations/<location>/keyRings/<key_ring_name>/cryptoKeys/<key_name>

BigQueryAuditMetadata.JobConfig.Load

Load job configuration.

JSON representation
{
  "sourceUris": [
    string
  ],
  "sourceUrisTruncated": boolean,
  "schemaJson": string,
  "schemaJsonTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  }
}
Fields
sourceUris[]

string

URIs for the data to be imported. Entire list is truncated if exceeds 40K.

sourceUrisTruncated

boolean

True if the source_URIs field was truncated.

schemaJson

string

The table schema in JSON format. Entire field is truncated if exceeds 40K.

schemaJsonTruncated

boolean

True if the schemaJson field was truncated.

destinationTable

string

The destination table for the import.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

BigQueryAuditMetadata.JobConfig.Extract

Extract job configuration.

JSON representation
{
  "destinationUris": [
    string
  ],
  "destinationUrisTruncated": boolean,

  // Union field source can be only one of the following:
  "sourceTable": string,
  "sourceModel": string
  // End of list of possible types for union field source.
}
Fields
destinationUris[]

string

URIs where extracted data should be written. Entire list is truncated if exceeds 50K.

destinationUrisTruncated

boolean

True if the destination_URIs field was truncated.

Union field source.

source can be only one of the following:

sourceTable

string

The source table.

sourceModel

string

The source model.

BigQueryAuditMetadata.JobConfig.TableCopy

Table copy job configuration.

JSON representation
{
  "sourceTables": [
    string
  ],
  "sourceTablesTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  },
  "operationType": enum (BigQueryAuditMetadata.OperationType),
  "destinationExpirationTime": string
}
Fields
sourceTables[]

string

Source tables. Entire list is truncated if exceeds 50K.

sourceTablesTruncated

boolean

True if the sourceTables field was truncated.

destinationTable

string

Destination table.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

operationType

enum (BigQueryAuditMetadata.OperationType)

Supported operation types in the table copy job.

destinationExpirationTime

string (Timestamp format)

Expiration time set on the destination table. Expired tables will be deleted and their storage reclaimed.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

BigQueryAuditMetadata.JobStatus

Status of a job.

JSON representation
{
  "jobState": enum (BigQueryAuditMetadata.JobState),
  "errorResult": {
    object (Status)
  },
  "errors": [
    {
      object (Status)
    }
  ]
}
Fields
jobState

enum (BigQueryAuditMetadata.JobState)

State of the job.

errorResult

object (Status)

Job error, if the job failed.

errors[]

object (Status)

Errors encountered during the running of the job. Does not necessarily mean that the job has completed or was unsuccessful.

BigQueryAuditMetadata.JobStats

Job statistics.

JSON representation
{
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "totalSlotMs": string,
  "reservationUsage": [
    {
      object (BigQueryAuditMetadata.JobStats.ReservationResourceUsage)
    }
  ],
  "parentJobName": string,

  // Union field extended can be only one of the following:
  "queryStats": {
    object (BigQueryAuditMetadata.JobStats.Query)
  },
  "loadStats": {
    object (BigQueryAuditMetadata.JobStats.Load)
  },
  "extractStats": {
    object (BigQueryAuditMetadata.JobStats.Extract)
  }
  // End of list of possible types for union field extended.
}
Fields
createTime

string (Timestamp format)

Job creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

startTime

string (Timestamp format)

Job execution start time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Job completion time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

totalSlotMs

string (int64 format)

The total number of slot-ms consumed by the query job.

reservationUsage[]

object (BigQueryAuditMetadata.JobStats.ReservationResourceUsage)

Reservation usage attributed from each tier of a reservation hierarchy.

parentJobName

string

Parent job name. Only present for child jobs.

Union field extended. Statistics specific to the job type. extended can be only one of the following:
queryStats

object (BigQueryAuditMetadata.JobStats.Query)

Query job statistics.

loadStats

object (BigQueryAuditMetadata.JobStats.Load)

Load job statistics.

extractStats

object (BigQueryAuditMetadata.JobStats.Extract)

Extract job statistics.

BigQueryAuditMetadata.JobStats.Query

Query job statistics.

JSON representation
{
  "totalProcessedBytes": string,
  "totalBilledBytes": string,
  "billingTier": integer,
  "referencedTables": [
    string
  ],
  "referencedViews": [
    string
  ],
  "referencedRoutines": [
    string
  ],
  "outputRowCount": string,
  "cacheHit": boolean,
  "requestedQueryPriority": enum (BigQueryAuditMetadata.JobConfig.Query.Priority),
  "effectiveQueryPriority": enum (BigQueryAuditMetadata.JobConfig.Query.Priority)
}
Fields
totalProcessedBytes

string (int64 format)

Total bytes processed by the query job.

totalBilledBytes

string (int64 format)

Total bytes billed by the query job.

billingTier

integer

The tier assigned by the CPU-based billing.

referencedTables[]

string

Tables accessed by the query job.

referencedViews[]

string

Views accessed by the query job.

referencedRoutines[]

string

Routines accessed by the query job.

outputRowCount

string (int64 format)

Number of output rows produced by the query job.

cacheHit

boolean

True if the query job results were read from the query cache.

requestedQueryPriority

enum (BigQueryAuditMetadata.JobConfig.Query.Priority)

Query priority that was requested.

effectiveQueryPriority

enum (BigQueryAuditMetadata.JobConfig.Query.Priority)

Query priority that was effective for the execution of the query.

BigQueryAuditMetadata.JobStats.Load

Load job statistics.

JSON representation
{
  "totalOutputBytes": string
}
Fields
totalOutputBytes

string (int64 format)

Total bytes loaded by the import job.

BigQueryAuditMetadata.JobStats.Extract

Extract job statistics.

JSON representation
{
  "totalInputBytes": string
}
Fields
totalInputBytes

string (int64 format)

Total bytes exported by the extract job.

BigQueryAuditMetadata.JobStats.ReservationResourceUsage

Job resource usage breakdown by reservation.

JSON representation
{
  "name": string,
  "slotMs": string
}
Fields
name

string

Reservation name or "unreserved" for on-demand resources usage.

slotMs

string (int64 format)

Total slot milliseconds used by the reservation for a particular job.

BigQueryAuditMetadata.JobChange

Job state change event.

JSON representation
{
  "before": enum (BigQueryAuditMetadata.JobState),
  "after": enum (BigQueryAuditMetadata.JobState),
  "job": {
    object (BigQueryAuditMetadata.Job)
  }
}
Fields
before

enum (BigQueryAuditMetadata.JobState)

Job state before the job state change.

after

enum (BigQueryAuditMetadata.JobState)

Job state after the job state change.

job

object (BigQueryAuditMetadata.Job)

Job metadata.

BigQueryAuditMetadata.JobDeletion

Job deletion event.

JSON representation
{
  "jobName": string,
  "reason": enum (BigQueryAuditMetadata.JobDeletion.Reason)
}
Fields
jobName

string

Job URI.

Format: projects/<projectId>/jobs/<jobId>.

reason

enum (BigQueryAuditMetadata.JobDeletion.Reason)

Describes how the job was deleted.

BigQueryAuditMetadata.DatasetCreation

Dataset creation event.

JSON representation
{
  "dataset": {
    object (BigQueryAuditMetadata.Dataset)
  },
  "reason": enum (BigQueryAuditMetadata.DatasetCreation.Reason),
  "jobName": string
}
Fields
dataset

object (BigQueryAuditMetadata.Dataset)

Dataset metadata.

reason

enum (BigQueryAuditMetadata.DatasetCreation.Reason)

Describes how the dataset was created.

jobName

string

The URI of the job that created the dataset. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.