Skip to content

Commit

Permalink
feat(bigquery)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### bigquery:v2

The following keys were deleted:
- schemas.Explanation.description
- schemas.Explanation.id
- schemas.Explanation.properties.attribution.description
- schemas.Explanation.properties.attribution.format
- schemas.Explanation.properties.attribution.type
- schemas.Explanation.properties.featureName.description
- schemas.Explanation.properties.featureName.type
- schemas.Explanation.type
- schemas.GlobalExplanation.description
- schemas.GlobalExplanation.id
- schemas.GlobalExplanation.properties.classLabel.description
- schemas.GlobalExplanation.properties.classLabel.type
- schemas.GlobalExplanation.properties.explanations.description
- schemas.GlobalExplanation.properties.explanations.items.$ref
- schemas.GlobalExplanation.properties.explanations.type
- schemas.GlobalExplanation.type
- schemas.JobStatistics.properties.sessionInfoTemplate.$ref
- schemas.JobStatistics.properties.sessionInfoTemplate.description
- schemas.JobStatistics2.properties.dmlStats.type
- schemas.QueryResponse.properties.dmlStats.type
- schemas.TrainingRun.properties.globalExplanations.description
- schemas.TrainingRun.properties.globalExplanations.items.$ref
- schemas.TrainingRun.properties.globalExplanations.type

The following keys were added:
- schemas.BiEngineReason.id
- schemas.BiEngineReason.properties.code.default
- schemas.BiEngineReason.properties.code.description
- schemas.BiEngineReason.properties.code.type
- schemas.BiEngineReason.properties.message.default
- schemas.BiEngineReason.properties.message.description
- schemas.BiEngineReason.properties.message.type
- schemas.BiEngineReason.type
- schemas.BiEngineStatistics.id
- schemas.BiEngineStatistics.properties.biEngineMode.default
- schemas.BiEngineStatistics.properties.biEngineMode.description
- schemas.BiEngineStatistics.properties.biEngineMode.type
- schemas.BiEngineStatistics.properties.biEngineReasons.description
- schemas.BiEngineStatistics.properties.biEngineReasons.items.$ref
- schemas.BiEngineStatistics.properties.biEngineReasons.type
- schemas.BiEngineStatistics.type
- schemas.DmlStatistics.id
- schemas.DmlStatistics.properties.deletedRowCount.description
- schemas.DmlStatistics.properties.deletedRowCount.format
- schemas.DmlStatistics.properties.deletedRowCount.type
- schemas.DmlStatistics.properties.insertedRowCount.description
- schemas.DmlStatistics.properties.insertedRowCount.format
- schemas.DmlStatistics.properties.insertedRowCount.type
- schemas.DmlStatistics.properties.updatedRowCount.description
- schemas.DmlStatistics.properties.updatedRowCount.format
- schemas.DmlStatistics.properties.updatedRowCount.type
- schemas.DmlStatistics.type
- schemas.JobStatistics.properties.sessionInfo.$ref
- schemas.JobStatistics.properties.sessionInfo.description
- schemas.JobStatistics2.properties.biEngineStatistics.$ref
- schemas.JobStatistics2.properties.biEngineStatistics.description
- schemas.JobStatistics2.properties.dmlStats.$ref
- schemas.QueryResponse.properties.dmlStats.$ref
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jul 8, 2021
1 parent 53464e2 commit e9fba43
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 80 deletions.
112 changes: 65 additions & 47 deletions discovery/bigquery-v2.json
Expand Up @@ -1683,7 +1683,7 @@
}
}
},
"revision": "20210529",
"revision": "20210617",
"rootUrl": "https://bigquery.googleapis.com/",
"schemas": {
"AggregateClassificationMetrics": {
Expand Down Expand Up @@ -2137,6 +2137,40 @@
},
"type": "object"
},
"BiEngineReason": {
"id": "BiEngineReason",
"properties": {
"code": {
"default": "$(reason.code)",
"description": "[Output-only] High-level BI Engine reason for partial or disabled acceleration.",
"type": "string"
},
"message": {
"default": "$(reason.message)",
"description": "[Output-only] Free form human-readable reason for partial or disabled acceleration.",
"type": "string"
}
},
"type": "object"
},
"BiEngineStatistics": {
"id": "BiEngineStatistics",
"properties": {
"biEngineMode": {
"default": "$(stats.bi_engine_mode)",
"description": "[Output-only] Specifies which mode of BI Engine acceleration was performed (if any).",
"type": "string"
},
"biEngineReasons": {
"description": "In case of DISABLED or PARTIAL bi_engine_mode, these contain the explanatory reasons as to why BI Engine could not accelerate. In case the full query was accelerated, this field is not populated.",
"items": {
"$ref": "BiEngineReason"
},
"type": "array"
}
},
"type": "object"
},
"BigQueryModelTraining": {
"id": "BigQueryModelTraining",
"properties": {
Expand Down Expand Up @@ -2860,6 +2894,27 @@
},
"type": "object"
},
"DmlStatistics": {
"id": "DmlStatistics",
"properties": {
"deletedRowCount": {
"description": "Number of deleted Rows. populated by DML DELETE, MERGE and TRUNCATE statements.",
"format": "int64",
"type": "string"
},
"insertedRowCount": {
"description": "Number of inserted Rows. Populated by DML INSERT and MERGE statements.",
"format": "int64",
"type": "string"
},
"updatedRowCount": {
"description": "Number of updated Rows. Populated by DML UPDATE and MERGE statements.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"EncryptionConfiguration": {
"id": "EncryptionConfiguration",
"properties": {
Expand Down Expand Up @@ -3115,22 +3170,6 @@
},
"type": "object"
},
"Explanation": {
"description": "Explanation for a single feature.",
"id": "Explanation",
"properties": {
"attribution": {
"description": "Attribution of feature.",
"format": "double",
"type": "number"
},
"featureName": {
"description": "Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.",
"type": "string"
}
},
"type": "object"
},
"Expr": {
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.",
"id": "Expr",
Expand Down Expand Up @@ -3345,24 +3384,6 @@
},
"type": "object"
},
"GlobalExplanation": {
"description": "Global explanations containing the top most important features after training.",
"id": "GlobalExplanation",
"properties": {
"classLabel": {
"description": "Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.",
"type": "string"
},
"explanations": {
"description": "A list of the top global explanations. Sorted by absolute value of attribution in descending order.",
"items": {
"$ref": "Explanation"
},
"type": "array"
}
},
"type": "object"
},
"GoogleSheetsOptions": {
"id": "GoogleSheetsOptions",
"properties": {
Expand Down Expand Up @@ -4060,7 +4081,7 @@
"$ref": "ScriptStatistics",
"description": "[Output-only] Statistics for a child job of a script."
},
"sessionInfoTemplate": {
"sessionInfo": {
"$ref": "SessionInfo",
"description": "[Output-only] [Preview] Information of the session if this job is part of one."
},
Expand Down Expand Up @@ -4089,6 +4110,10 @@
"JobStatistics2": {
"id": "JobStatistics2",
"properties": {
"biEngineStatistics": {
"$ref": "BiEngineStatistics",
"description": "BI Engine specific Statistics. [Output-only] BI Engine specific Statistics."
},
"billingTier": {
"description": "[Output-only] Billing tier for the job.",
"format": "int32",
Expand Down Expand Up @@ -4128,8 +4153,8 @@
"description": "[Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries."
},
"dmlStats": {
"description": "[Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE.",
"type": "any"
"$ref": "DmlStatistics",
"description": "[Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE."
},
"estimatedBytesProcessed": {
"description": "[Output-only] The original estimate of bytes processed for the job.",
Expand Down Expand Up @@ -4891,8 +4916,8 @@
"type": "boolean"
},
"dmlStats": {
"description": "[Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE.",
"type": "any"
"$ref": "DmlStatistics",
"description": "[Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE."
},
"errors": {
"description": "[Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.",
Expand Down Expand Up @@ -6482,13 +6507,6 @@
"$ref": "EvaluationMetrics",
"description": "The evaluation metrics over training/eval data that were computed at the end of training."
},
"globalExplanations": {
"description": "Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.",
"items": {
"$ref": "GlobalExplanation"
},
"type": "array"
},
"results": {
"description": "Output of each iteration run, results.size() <= max_iterations.",
"items": {
Expand Down
74 changes: 41 additions & 33 deletions src/apis/bigquery/v2.ts
Expand Up @@ -382,6 +382,26 @@ export namespace bigquery_v2 {
*/
logType?: string | null;
}
export interface Schema$BiEngineReason {
/**
* [Output-only] High-level BI Engine reason for partial or disabled acceleration.
*/
code?: string | null;
/**
* [Output-only] Free form human-readable reason for partial or disabled acceleration.
*/
message?: string | null;
}
export interface Schema$BiEngineStatistics {
/**
* [Output-only] Specifies which mode of BI Engine acceleration was performed (if any).
*/
biEngineMode?: string | null;
/**
* In case of DISABLED or PARTIAL bi_engine_mode, these contain the explanatory reasons as to why BI Engine could not accelerate. In case the full query was accelerated, this field is not populated.
*/
biEngineReasons?: Schema$BiEngineReason[];
}
export interface Schema$BigQueryModelTraining {
/**
* [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
Expand Down Expand Up @@ -850,6 +870,20 @@ export namespace bigquery_v2 {
*/
labels?: {[key: string]: string} | null;
}
export interface Schema$DmlStatistics {
/**
* Number of deleted Rows. populated by DML DELETE, MERGE and TRUNCATE statements.
*/
deletedRowCount?: string | null;
/**
* Number of inserted Rows. Populated by DML INSERT and MERGE statements.
*/
insertedRowCount?: string | null;
/**
* Number of updated Rows. Populated by DML UPDATE and MERGE statements.
*/
updatedRowCount?: string | null;
}
export interface Schema$EncryptionConfiguration {
/**
* [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
Expand Down Expand Up @@ -1048,19 +1082,6 @@ export namespace bigquery_v2 {
*/
substeps?: string[] | null;
}
/**
* Explanation for a single feature.
*/
export interface Schema$Explanation {
/**
* Attribution of feature.
*/
attribution?: number | null;
/**
* Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
*/
featureName?: string | null;
}
/**
* Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
*/
Expand Down Expand Up @@ -1235,19 +1256,6 @@ export namespace bigquery_v2 {
*/
kind?: string | null;
}
/**
* Global explanations containing the top most important features after training.
*/
export interface Schema$GlobalExplanation {
/**
* Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
*/
classLabel?: string | null;
/**
* A list of the top global explanations. Sorted by absolute value of attribution in descending order.
*/
explanations?: Schema$Explanation[];
}
export interface Schema$GoogleSheetsOptions {
/**
* [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20
Expand Down Expand Up @@ -1774,7 +1782,7 @@ export namespace bigquery_v2 {
/**
* [Output-only] [Preview] Information of the session if this job is part of one.
*/
sessionInfoTemplate?: Schema$SessionInfo;
sessionInfo?: Schema$SessionInfo;
/**
* [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
*/
Expand All @@ -1793,6 +1801,10 @@ export namespace bigquery_v2 {
transactionInfo?: Schema$TransactionInfo;
}
export interface Schema$JobStatistics2 {
/**
* BI Engine specific Statistics. [Output-only] BI Engine specific Statistics.
*/
biEngineStatistics?: Schema$BiEngineStatistics;
/**
* [Output-only] Billing tier for the job.
*/
Expand Down Expand Up @@ -1832,7 +1844,7 @@ export namespace bigquery_v2 {
/**
* [Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE.
*/
dmlStats?: any | null;
dmlStats?: Schema$DmlStatistics;
/**
* [Output-only] The original estimate of bytes processed for the job.
*/
Expand Down Expand Up @@ -2309,7 +2321,7 @@ export namespace bigquery_v2 {
/**
* [Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE.
*/
dmlStats?: any | null;
dmlStats?: Schema$DmlStatistics;
/**
* [Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.
*/
Expand Down Expand Up @@ -3200,10 +3212,6 @@ export namespace bigquery_v2 {
* The evaluation metrics over training/eval data that were computed at the end of training.
*/
evaluationMetrics?: Schema$EvaluationMetrics;
/**
* Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
*/
globalExplanations?: Schema$GlobalExplanation[];
/**
* Output of each iteration run, results.size() <= max_iterations.
*/
Expand Down

0 comments on commit e9fba43

Please sign in to comment.