從自訂來源匯入個人資料

您可以從 Cloud Storage 或 BigQuery 匯入使用者資料,不必從 Google Workspace 同步處理。這個頁面說明如何建立使用者搜尋連接器,以及從 Cloud Storage bucket 或 BigQuery 資料表匯入使用者的自訂資料。

事前準備

  • 使用者資料必須儲存於 BigQuery 資料表或 Cloud Storage bucket。
  • 資料必須採用 Google 指定的結構定義。如要進一步瞭解結構定義,請參閱「Google 指定的使用者資料結構定義」。

從自訂來源匯入使用者資料

為透過 Google Cloud 控制台擷取使用者資料,請按照下列步驟操作:

主控台

  1. 前往 Google Cloud 控制台的「Gemini Enterprise」頁面。

    Gemini Enterprise

  2. 前往「Data Stores」(資料儲存庫) 頁面。

  3. 點按「 Create Data Store」(建立資料儲存庫)

    顯示「建立資料儲存庫」按鈕。
    建立新的資料儲存庫。

  4. 在「Select a data source」(選取資料來源) 頁面的「Cloud sources」(Cloud 來源) 專區,選取「People via Custom Connector」(透過自訂連接器搜尋使用者)

    選取資料來源。
    選取資料來源。

  5. 匯入使用者資料:

    • 「Import later」(稍後再匯入):如果尚未將使用者資料匯入 Cloud SQL 或 BigQuery,請選取「Import later」(稍後再匯入)

    • 「BigQuery」:匯入 BigQuery 資料表中的資料。

    • 「Cloud Storage」:匯入 Cloud Storage 資料表中的資料。

    匯入使用者資料的選項,包括稍後再匯入、從 BigQuery 匯入,或從 Cloud Storage 匯入。
    匯入使用者資料。

  6. 按一下「繼續」

  7. 選擇資料儲存庫的區域。

  8. 輸入資料儲存庫的名稱。

  9. 選用:如果需要控管資料存取權,請選取「This data store contains access control information」(這個資料儲存庫含有存取權控管資訊)。詳情請參閱「資料來源存取控管」。

  10. 點選「建立」

    設定及建立資料連接器。
    設定資料連接器。

  11. 接著需要檢查擷取狀態,請前往「Data stores」(資料儲存庫) 頁面,點按資料儲存庫名稱,即可在相應的「Data」(資料) 頁面查看該儲存庫的詳細資料。「Activity」(活動) 分頁的狀態欄從「In progress」(進行中) 變為「Import completed」(匯入完成) 時,表示擷取作業已完成。

    視資料大小而定,可能需要數分鐘至數小時才能擷取完畢。

自訂搜尋結果

按照下列步驟操作,即可在搜尋結果中加入或排除個人資訊:

  1. 在資料儲存庫中,依序點按「Entity」(實體) 分頁標籤和「Users」(使用者)。

  2. 在「Users」(使用者) 頁面中,點按「Schema」(結構定義) 分頁標籤。

  3. 點選「Edit」(編輯)

  4. 透過選取或清除國家/地區等屬性,指定這些屬性是否可供擷取、搜尋及建立索引。如要讓屬性可供搜尋,必須標示為「Retrievable」(可擷取)、「Indexable」(可建立索引) 和「Searchable」(可供搜尋)。

  5. 點選「Save」(儲存)

預覽使用者搜尋結果

  1. 如果已將資料儲存庫連結至應用程式,請依序點按「Apps」(應用程式) 和應用程式名稱。

  2. 點選「Preview」(預覽)

  3. 使用搜尋列搜尋貴組織中的使用者。搜尋結果會顯示姓名、職稱、電子郵件和個人資料相片等詳細資料。

    如要在瀏覽器開啟 Gemini Enterprise 網頁應用程式,請參閱「查看搜尋網頁應用程式」。

    預覽搜尋結果。
    預覽搜尋結果。

    如果已將自訂屬性設為可供搜尋,您就能在搜尋中使用這些屬性,但屬性本身不會顯示在個人資料中。舉例來說,如果 team-position 是自訂屬性,且在結構定義中標示為可擷取、可建立索引及可供搜尋,您就可以搜尋特定團隊職位的人員,例如「技術主管」。系統會列出擔任該職位的人員,但輸出內容不會包含「技術主管」一詞。

查看搜尋網頁應用程式

按照下列步驟操作,即可查看 Gemini Enterprise 網頁應用程式:

  1. 在導覽選單中,按一下「Integration」(整合)

  2. 確認已啟用「Enable the Web App」(啟用網頁應用程式)

  3. 在「The link to your web app」(網頁應用程式連結) 專區,按一下「Copy」(複製),然後在瀏覽器中開啟連結。

組織定義的使用者資料結構定義欄位範例

為每位使用者設定的資料均須採用下列結構定義。從 Cloud Storage 匯入的 JSONL 檔案範例中,一行代表一位使用者。最小的有效檔案可能會如下所示:

{"id":"01","structData":{"personId":"01","name":{"familyName":"Doe","givenName":"Jane"},"email":{"type":"work","value":"jdoe@example.com"}}}
{"id":"02","structData":{"personId":"02","name":{"familyName":"Kumar","givenName":"Ashok"},"email":{"type":"home","value":"akumar@example.net"}}}

欄位名稱

類型

可重複執行

可建立索引

可擷取

可供搜尋

說明

personId

字串

使用者的專屬 ID,必填。personId 欄位的值必須與文件的 id 相同。

name.familyName

字串

使用者的姓氏。

name.givenName

字串

使用者的名字。

name.displayName

字串

使用者的顯示名稱。

name.username

字串

使用者的使用者名稱。

emails.type

字串

電子郵件帳戶類型,例如「公司」、「住家」、「其他」或「自訂」。

emails.value

字串

使用者的電子郵件地址,例如 acruz@example.net。

phoneNumbers.type

字串

電話號碼類型,例如「辦公室」、「手機」或「其他」。

phoneNumbers.value

字串

使用者的電話號碼,例如 +1 800-555-1212。

suspended

布林值

使用者是否已在組織遭到停權。

employeeId

字串

使用者的員工 ID。

employeeType

字串

使用者的員工類型,例如「全職員工」、「實習生」或「臨時人員」。

employmentStatus

字串

使用者的聘僱狀態。

availabilityStatus

字串

使用者的空閒狀態,例如「不在辦公室」、「在家工作」或「開會中」。

creationDate

日期時間

使用者在來源系統的建立日期。

modifiedDate

日期時間

使用者在來源系統的上次修改日期。

deletionDate

日期時間

使用者在來源系統的刪除日期。

hireDate

日期時間

聘用這位使用者的日期。

gender.addressMeAs

字串

使用者偏好的代名詞,例如「他」、「她」或「他們/她們」。

gender.type

字串

使用者的性別,例如「男性」、「女性」或「其他」。

displayPhoto.url

字串

相片的網址。

displayPhoto.imageBinary

字串

相片圖像二進位檔的 Base64 編碼字串。

displayPhoto.format

字串

圖像二進位檔的格式,例如 png。

addresses.country

字串

相關聯地址的國家/地區,例如「美國」。

addresses.countryCode

字串

相關聯地址的國家/地區代碼,例如 US。

addresses.locality

字串

相關聯地址的所在地,例如「山景城」。

addresses.poBox

字串

相關聯地址的郵政信箱,例如 PO Box 123。

addresses.postalCode

字串

相關聯地址的郵遞區號,例如 94045。

addresses.region

字串

相關聯地址的區域,例如 CA。

addresses.streetAddress

字串

相關聯的街道地址,例如「1800 Amphibious Blvd」。

addresses.type

字串

相關聯地址的類型,例如「住家」、「公司」或「其他」。

location.value

字串

使用者的辦公室位置,例如「倫敦」。

location.buildingId

字串

使用者辦公室位置的建築物 ID,例如「London」。

location.deskCode

字串

使用者辦公室位置的桌號,例如 5C1C。

location.floorName

字串

使用者辦公室所在樓層的名稱,例如 5 樓。

location.floorSection

字串

辦公室所在的樓層區域,例如 C 區。

location.type

字串

辦公室的類型,例如「辦公桌」或「建築物」。

organizations.department

字串

組織部門,例如「工程」。

organizations.description

字串

組織的說明。

organizations.jobTitle

字串

使用者的職稱,例如「軟體工程師」。

organizations.location

字串

組織的位置,例如「倫敦」。

organizations.name

字串

組織名稱。

organizations.symbol

字串

組織的股票代號。

organizations.costCenter

字串

組織的成本中心,例如 75B。

organizations.type

字串

組織的類型,例如「工作」或「其他」。

organizations.projects.name

字串

使用者獲派專案的名稱,例如 MLOps。

organizations.projects.description

字串

使用者獲派專案的說明,例如「打造全球最佳的機器學習基礎架構」。

organizations.projects.role

字串

使用者在專案的角色,例如「主管」。

managers.personId

字串

使用者當前管理鏈的 personId,從直屬主管到最高層級主管。

managers.email

字串

使用者目前管理鏈中每位主管的電子郵件地址,從直屬主管到最高層級主管。

dottedLineReports.personId

字串

使用者的虛線報告 (personId)。

dottedLineReports.email

字串

使用者的虛線報告 (email)。

topCoworkers.personId

字串

使用者的同事 (personId)。

topCoworkers.affinityScore

數字

使用者相對於同事的關聯分數 (用於排名)。

admins.personId

字串

使用者獲派的管理員 (personId)。

admins.email

字串

使用者獲派的管理員 (email)。

websites.type

字串

使用者的網站類型,例如「工作」、「網誌」或「其他」。

websites.value

字串

網站類型,例如 https://example-pet-store.com。

directManager.personId

字串

使用者直屬/直接主管的 personId。

BigQuery 酬載範例

INSERT INTO `playground-koyel.ibank_ccai_uat.people_connector_3` (id, structData)
WITH records_to_insert AS (
  SELECT [
    -- Record 1: jdoe
    STRUCT('jdoe' as id, STRUCT(
        "jdoe" AS personId,
        STRUCT("Doe","Jane","Jane Doe","jdoe") AS name,
        [STRUCT("work","jdoe@example.net")] AS emails,
        [STRUCT("personal","9131568042")] AS phoneNumbers,
        false AS suspended,
        "13" AS employeeId,
        CAST(NULL AS STRING) as employeeType,
        CAST(NULL AS STRING) as employmentStatus,
        "focus" AS availabilityStatus,
        CAST(NULL AS DATETIME) AS creationDate,
        CAST(NULL AS DATETIME) AS modifiedDate,
        CAST(NULL AS DATETIME) AS deletionDate,
        CAST(NULL AS DATETIME) AS hireDate,
        STRUCT("Male","Male") AS gender,
        STRUCT(CAST(NULL AS STRING) AS url, CAST(NULL AS STRING) AS imageBinary, "png" as format) AS displayPhoto,
        [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))] AS addresses,
        STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)) AS location,
        [STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Software Engineer","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("People Search",CAST(NULL AS STRING),"Individual Contributor")])] AS organizations,
        [STRUCT("dwilson",CAST(NULL AS STRING)),STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))] AS managers,
        CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>) AS dottedLineReports,
        CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>) AS topCoworkers,
        CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>) AS admins,
        [STRUCT("personal","https://jdoe.myownpersonaldomain.com")] AS websites,
        STRUCT("dwilson") AS directManager
    ) AS structData),

    -- Record 2: psmith
    STRUCT('psmith' as id, STRUCT(
        "psmith",
        STRUCT("Smith","Peter","Peter Smith","psmith"),
        [STRUCT("work","psmith@example.net")],
        [STRUCT("personal","abc")],
        false, "1249989", CAST(NULL AS STRING), CAST(NULL AS STRING), "focus", CAST(NULL AS DATETIME), CAST(NULL AS DATETIME), CAST(NULL AS DATETIME), CAST(NULL AS DATETIME),
        STRUCT("Male","Male"),
        CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>),
        [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))],
        STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),
        [STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Software Engineer","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("ACL",CAST(NULL AS STRING),"Individual Contributor")])],
        [STRUCT("dwilson",CAST(NULL AS STRING)),STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))],
        CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>), CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>), CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),
        CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),
        STRUCT("dwilson")
    ) AS structData),

    -- Record 3: mgarcia
    STRUCT('mgarcia' as id, STRUCT(
        "mgarcia",
        STRUCT("Garcia","Maria","Maria Garcia","mgarcia"),
        [STRUCT("work","mgarcia@example.net")],
        [STRUCT("personal","abc")],
        false, "1204052", CAST(NULL AS STRING), CAST(NULL AS STRING), "focus", CAST(NULL AS DATETIME), CAST(NULL AS DATETIME), CAST(NULL AS DATETIME), CAST(NULL AS DATETIME),
        STRUCT("Female","Female"),
        CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>),
        [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))],
        STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),
        [STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Software Engineer","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("People Search",CAST(NULL AS STRING),"Individual Contributor")]), STRUCT("gBadminton","To organize our team's badminton community and make the sport accessible to all.","Organizer","Bangalore","OneBlr",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],
        [STRUCT("dwilson",CAST(NULL AS STRING)),STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))],
        CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>), CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>), CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),
        [STRUCT("personal","https://mgarcia.myownpersonaldomain.com")],
        STRUCT("dwilson")
    ) AS structData),

    -- Other records follow the same pattern...
    STRUCT('dwilson' as id, STRUCT("dwilson", STRUCT("Wilson","David","David Wilson","dwilson"),[STRUCT("work","dwilson@example.net")],[STRUCT("personal","abc")],false,"14",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Engineering Manager","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("Connectors",CAST(NULL AS STRING),"Engineering Manager")])],[STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),STRUCT("smiller")) AS structData),
    STRUCT('ejohnson' as id, STRUCT("ejohnson", STRUCT("Johnson","Emily","Emily Johnson","ejohnson"),[STRUCT("work","ejohnson@example.net")],[STRUCT("personal","abc")],false,"652365",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Senior Software Engineer","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("BAP Connector Integration",CAST(NULL AS STRING),"Team Lead")])],[STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),STRUCT("smiller")) AS structData),
    STRUCT('mbrown' as id, STRUCT("mbrown", STRUCT("Brown","Michael","Michael Brown","mbrown"),[STRUCT("work","mbrown@example.net")],[STRUCT("personal","abc")],false,"1007126",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Female","Female"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Software Engineer","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("BAP Connector Integration",CAST(NULL AS STRING),"Individual Contributor")])],[STRUCT("smiller",CAST(NULL AS STRING)),STRUCT("jmartinez",CAST(NULL AS STRING))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),STRUCT("smiller")) AS structData),
    STRUCT('smiller' as id, STRUCT("smiller", STRUCT("Miller","Sarah","Sarah Miller","smiller"),[STRUCT("work","smiller@example.net")],[STRUCT("personal","abc")],false,"15",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),"7",CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","Senior Engineering Manager","Bangalore","Intranet search",CAST(NULL AS STRING),"80997GX000",CAST(NULL AS STRING),[STRUCT("Intranet Search",CAST(NULL AS STRING),"Senior Engineering Manager")])],[STRUCT("jmartinez",CAST(NULL AS STRING))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),STRUCT("jmartinez")) AS structData),
    STRUCT('clee' as id, STRUCT("clee", STRUCT("Lee","Chris","Chris Lee","clee"),[STRUCT("work","clee@example.net")],[STRUCT("personal","abc")],false,"717389",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Female","Female"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("US","US","Kirkland",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Kirkland","US-KIR-6THC",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Empower every GCP customer to transform themselves through intelligence from their data.","Software Engineer","Kirkland","Vertex AI Search",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],[STRUCT("jmartinez",CAST(NULL AS STRING))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),STRUCT("jmartinez")) AS structData),
    STRUCT('jmartinez' as id, STRUCT("jmartinez", STRUCT("Martinez","Jessica","Jessica Martinez","jmartinez"),[STRUCT("work","jmartinez@example.net")],[STRUCT("personal","abc")],false,"153035",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("United States of America","US","Sunnyvale",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Sunnyvale","US-SVL-MP2",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Empower every GCP customer to transform themselves through intelligence from their data.","Engineering Director","Sunnyvale","Vertex AI Search",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData),
    STRUCT('dtaylor' as id, STRUCT("dtaylor", STRUCT("Taylor","Daniel","Daniel Taylor","dtaylor"),[STRUCT("work","dtaylor@example.net")],[STRUCT("personal","abc")],false,"950380",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Female","Female"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("United States of America","US","Sunnyvale",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Sunnyvale","US-SVL-MP5",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Empower every GCP customer to transform themselves through intelligence from their data.","Product Manager","Sunnyvale","Vertex AI Search",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData),
    STRUCT('oanderson' as id, STRUCT("oanderson", STRUCT("Anderson","Olivia","Olivia Anderson","oanderson"),[STRUCT("work","oanderson@example.net")],[STRUCT("personal","abc")],false,"103388",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("United States of America","US","Remote",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Remote","US-REMOTE-MTV",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Engineering","Keep developers happy with their source code tools and services.","Git Maintainer",CAST(NULL AS STRING),"Developer Services",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData),
    STRUCT('mthomas' as id, STRUCT("mthomas", STRUCT("Thomas","Matthew","Matthew Thomas","mthomas"),[STRUCT("work","mthomas@example.net")],[STRUCT("personal","abc")],false,"363045",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Female","Female"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("United States of America","US","Mountain View",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Remote","US-MTV-40",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Finance","Getting more ambitious things done","CIO",CAST(NULL AS STRING),"Alphabet",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData),
    STRUCT('swhite' as id, STRUCT("swhite", STRUCT("White","Sophia","Sophia White","swhite"),[STRUCT("work","swhite@example.net")],[STRUCT("personal","abc")],false,"938578",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Customer","Successful Strategic Customer in the Cloud!","Strategic Cloud Engineer",CAST(NULL AS STRING),"Cloud Professional Services Organization (PSO)",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData),
    STRUCT('jharris' as id, STRUCT("jharris", STRUCT("Harris","James","James Harris","jharris"),[STRUCT("work","jharris@example.net")],[STRUCT("personal","abc")],false,"723457",CAST(NULL AS STRING),CAST(NULL AS STRING),"focus",CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),CAST(NULL AS DATETIME),STRUCT("Male","Male"),CAST(NULL AS STRUCT<url STRING, imageBinary STRING, format STRING>), [STRUCT("India","IN","Bangalore",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING))], STRUCT("Bangalore","IN-LOCATION-01",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING)),[STRUCT("Recruiting",CAST(NULL AS STRING),"Sr Recruiter",CAST(NULL AS STRING),"Hiring Committee",CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS STRING),CAST(NULL AS ARRAY<STRUCT<name STRING, description STRING, role STRING>>))],CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, affinityScore NUMERIC>>),CAST(NULL AS ARRAY<STRUCT<personId STRING, email STRING>>),CAST(NULL AS ARRAY<STRUCT<type STRING, value STRING>>),CAST(NULL AS STRUCT<personId STRING>)) AS structData)
  ] AS all_records
)
SELECT
  record.id,
  record.structData
FROM records_to_insert, UNNEST(all_records) as record;

Cloud Storage 酬載範例

{"id":"person1","structData":{"working_from_home": "false", "personId":"person1","name":{"familyName":"Kumar","givenName":"person1","displayName":"person1 Kumar","username":"person1"},"emails":[{"type":"work","value":"person1@example.net"}],"phoneNumbers":[{"type":"personal","value":"1234"}],"suspended":false,"employeeId":"13","availabilityStatus":"focus","gender":{"addressMeAs":"Male","type":"Male"},"addresses":[{"country":"India","countryCode":"IN","locality":"Bangalore"}],"location":{"value":"Bangalore","buildingId":"IN-LOCATION-01","floorName":"7"},"organizations":[{"department":"Engineering","description":"Our mission is to help organizations be more productive by making contextually relevant information and collaborators accessible at the right time","jobTitle":"Software Engineer","location":"Bangalore","name":"Intranet search","projects":[{"name":"People Search","role":"Individual Contributor"}],"costCenter":"123"}],"directManager":{"personId":"manager1"},"managers":[{"personId":"manager1"},{"personId":"manager2"},{"personId":"manager3"}],"websites":[{"type":"personal","value":"https://person1.myownpersonaldomain.com"}],"displayPhoto":{"imageBinary":{"format":"image/png","data":"binary_content"}}}}