擷取所提供資料表參照的 BigQuery 資料表內容資料。情境資料包括表格結構定義資訊和範例值。
HTTP 要求
POST https://geminidataanalytics.googleapis.com/v1alpha/{parent=projects/*/locations/*}:retrieveBigQueryTableContext
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 | |
---|---|
parent |
這是必要旗標,RetrieveBigQueryTableContextRequest 的父項值。模式: |
要求主體
要求主體包含下列結構的資料:
JSON 表示法 |
---|
{
"project": string,
"query": string,
"directLookup": [
{
object ( |
欄位 | |
---|---|
project |
必填。 |
query |
(選用步驟) 以自然語言提出的使用者查詢。 |
directLookup[] |
(選用步驟) 直接查詢參數清單。 |
回應主體
透過直接查詢擷取 BigQuery 資料表內容資料的回應。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
---|
{ "candidates": [ { object ( |
欄位 | |
---|---|
candidates[] |
擷取的候選項目清單,以及其隨附的中繼資料。 |
tableCandidates[] |
擷取的候選項目清單,以及其隨附的中繼資料。 |
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platform
詳情請參閱Authentication Overview。
候選
擷取的候選人。
JSON 表示法 |
---|
{ "linkedResource": string, "content": string } |
欄位 | |
---|---|
linkedResource |
候選人在來源系統中的完整資源名稱 (如適用)。舉例來說,如果是 BigQuery 資料表,格式為: |
content |
字串格式的內容。 |