您可以从 Cloud Storage 或 BigQuery 导入人员数据,而不是从 Google Workspace 同步人员数据。本页面介绍了如何创建人员搜索连接器,以及如何从 Cloud Storage 存储桶或 BigQuery 表中导入有关人员的自定义数据。
准备工作
- 您必须将人员数据存储在 BigQuery 表或 Cloud Storage 存储桶中。
- 您的数据必须采用 Google 指定的架构。如需详细了解该架构,请参阅 Google 针对人员数据指定的架构。
从自定义来源注入人员数据
如需使用 Google Cloud 控制台注入人员数据,请按以下步骤操作:
控制台
在 Google Cloud 控制台中,前往 Gemini Enterprise 页面。
前往数据存储区页面。
点击
创建数据存储区。创建新的数据存储区。 在选择数据源页面上的云来源部分中,选择通过自定义连接器搜索来源的用户。
选择数据源。 导入人员数据:
稍后导入:如果您尚未将人员数据导入到 Cloud SQL 或 BigQuery,请选择稍后导入。
BigQuery:从 BigQuery 表导入数据。
Cloud Storage:从 Cloud Storage 存储桶导入数据。
导入人员数据。 点击继续。
为数据存储区选择一个区域。
为数据存储区输入名称。
可选:如果需要对数据进行访问权限控制,请选择此数据存储区包含访问权限控制信息。如需了解详情,请参阅数据源访问权限控制。
点击创建。
配置数据连接器。 如需查看数据注入状态,请前往数据存储区页面,然后点击数据存储区名称,在其数据页面上查看相关详情。当活动标签页上的“状态”列从正在进行更改为导入已完成时,表示注入已完成。
注入过程可能需要几分钟或几小时才能完成,具体取决于数据的大小。
自定义搜索结果
如需在搜索结果中包含或排除个人信息,请按以下步骤操作:
在数据存储区中,点击实体标签页,然后点击用户。
在用户页面中,点击架构标签页。
点击修改。
选择或清除国家/地区等属性,以指定其是否可检索、可搜索和可编入索引。如需使属性可搜索,必须将其标记为可检索、可编入索引和可搜索。
点击保存。
预览人员搜索结果
如果您已将数据存储区关联到应用,请点击应用,然后点击应用的名称。
点击预览。
使用搜索栏搜索您组织中的人员。搜索结果将显示姓名、职位、邮箱和个人资料照片等详细信息。
如需在浏览器中打开 Gemini Enterprise Web 应用,请参阅查看搜索 Web 应用。
预览搜索结果。 如果您已将自定义属性设为可搜索,则可以在搜索中使用这些属性,但它们本身不会在个人资料中显示。例如,如果
team-position
是自定义属性,并且在架构中标记为可检索、可编入索引和可搜索,那么您可以搜索具有特定团队职位(例如“技术主管”)的人员。您会获得担任该职位的人员名单,但输出结果中不会包含“技术主管”字样。
查看搜索 Web 应用
如需查看 Gemini Enterprise Web 应用,请执行以下操作:
在导航菜单中,点击集成。
确保启用 Web 应用已启用。
在指向您 Web 应用的链接部分中,点击复制,然后在浏览器中打开该链接。
示例:组织定义的人员数据架构字段
每个人员的数据集都必须按照以下架构设置格式。在从 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。必填字段。 |
name.familyName |
字符串 |
否 |
是 |
是 |
是 |
人员的姓氏。 |
name.givenName |
字符串 |
否 |
是 |
是 |
是 |
人员的名字。 |
name.displayName |
字符串 |
否 |
是 |
是 |
是 |
人员的显示名称。 |
name.username |
字符串 |
否 |
是 |
是 |
是 |
人员的用户名。 |
emails.type |
字符串 |
是 |
否 |
否 |
否 |
邮箱账号的类型,例如“work”“home”“other”或“custom”。 |
emails.value |
字符串 |
是 |
是 |
是 |
是 |
人员的邮箱,例如“acruz@example.net”。 |
phoneNumbers.type |
字符串 |
是 |
是 |
是 |
是 |
电话号码的类型,例如“office”“mobile”或“other”。 |
phoneNumbers.value |
字符串 |
是 |
是 |
是 |
是 |
人员的电话号码,例如“+1 800-555-1212”。 |
suspended |
布尔值 |
否 |
否 |
否 |
否 |
人员是否已在组织中被中止。 |
employeeId |
字符串 |
否 |
是 |
是 |
是 |
人员的员工 ID。 |
employeeType |
字符串 |
否 |
是 |
是 |
是 |
人员的员工类型,例如“FTE”“Intern”或“Temp”。 |
employmentStatus |
字符串 |
否 |
否 |
否 |
否 |
人员的雇佣形式。 |
availabilityStatus |
字符串 |
否 |
否 |
否 |
否 |
人员的空闲状态,例如“OOO”“WFH”或“In Meeting”。 |
creationDate |
日期时间 |
否 |
否 |
否 |
否 |
人员在源系统中的创建日期。 |
modifiedDate |
日期时间 |
否 |
否 |
否 |
否 |
人员在源系统中的上次修改日期。 |
deletionDate |
日期时间 |
否 |
否 |
否 |
否 |
人员在源系统中的删除日期。 |
hireDate |
日期时间 |
否 |
是 |
是 |
否 |
人员的雇佣日期。 |
gender.addressMeAs |
字符串 |
否 |
是 |
是 |
是 |
人员的人称代词偏好,例如“he/him”“she/her”或“they/them”。 |
gender.type |
字符串 |
否 |
是 |
是 |
是 |
人员的性别,例如“male”“female”或“other”。 |
displayPhoto.url |
字符串 |
否 |
是 |
是 |
是 |
照片的网址。 |
displayPhoto.imageBinary |
字符串 |
否 |
是 |
是 |
是 |
照片的图片二进制文件的 Base64 编码字符串。 |
displayPhoto.format |
字符串 |
否 |
是 |
是 |
是 |
图片二进制数据的格式,例如“png”。 |
addresses.country |
字符串 |
是 |
是 |
是 |
是 |
关联地址的国家/地区,例如“United States”。 |
addresses.countryCode |
字符串 |
是 |
否 |
否 |
否 |
关联地址的国家/地区代码,例如“US”。 |
addresses.locality |
字符串 |
是 |
是 |
是 |
是 |
关联地址的城市/地区,例如“Mountain View”。 |
addresses.poBox |
字符串 |
是 |
否 |
否 |
否 |
关联地址的邮政信箱,例如“PO Box 123”。 |
addresses.postalCode |
字符串 |
是 |
否 |
否 |
否 |
关联地址的邮政编码,例如“94045”。 |
addresses.region |
字符串 |
是 |
否 |
否 |
否 |
关联地址的地区,例如“CA”。 |
addresses.streetAddress |
字符串 |
是 |
是 |
是 |
是 |
关联的街道地址,例如“1800 Amphibious Blvd.”。 |
addresses.type |
字符串 |
是 |
否 |
否 |
否 |
关联地址的类型,例如“home”“work”或“other”。 |
location.value |
字符串 |
否 |
是 |
是 |
是 |
人员的办公地点,例如“London”。 |
location.buildingId |
字符串 |
否 |
是 |
是 |
是 |
人员办公地点的建筑物 ID,例如“London”。 |
location.deskCode |
字符串 |
否 |
是 |
是 |
是 |
人员办公地点的办公桌代码,例如“5C1C”。 |
location.floorName |
字符串 |
否 |
是 |
是 |
是 |
人员办公地点的楼层名称,例如“Floor 5”。 |
location.floorSection |
字符串 |
否 |
是 |
是 |
是 |
地点的楼层分区,例如“Section C”。 |
location.type |
字符串 |
否 |
否 |
否 |
否 |
地点的类型,例如“desk”或“building”。 |
organizations.department |
字符串 |
是 |
是 |
是 |
是 |
组织的部门,例如“Engineering”。 |
organizations.description |
字符串 |
是 |
否 |
否 |
否 |
组织的说明。 |
organizations.jobTitle |
字符串 |
是 |
是 |
是 |
是 |
人员的职位,例如“Software Engineer”。 |
organizations.location |
字符串 |
是 |
是 |
是 |
是 |
组织所在地,例如“London”。 |
organizations.name |
字符串 |
是 |
是 |
是 |
是 |
机构的名称。 |
organizations.symbol |
字符串 |
是 |
否 |
否 |
否 |
组织的股票代码。 |
organizations.costCenter |
字符串 |
是 |
是 |
是 |
是 |
组织的成本中心,例如“75B”。 |
organizations.type |
字符串 |
是 |
否 |
否 |
否 |
组织的类型,例如“work”或“other”。 |
organizations.projects.name |
字符串 |
是 |
是 |
是 |
是 |
分配给该人员的项目名称,例如“ML Ops”。 |
organizations.projects.description |
字符串 |
是 |
否 |
否 |
否 |
分配给该人员的项目说明,例如“Build world's best ML infra”。 |
organizations.projects.role |
字符串 |
是 |
否 |
否 |
否 |
该人员在项目中的角色,例如“Lead”。 |
managers.personId |
字符串 |
是 |
是 |
是 |
是 |
人员当前管理链的 personId(从直属经理到最高级经理)。 |
managers.email |
字符串 |
是 |
是 |
是 |
是 |
该人员当前管理链中,从直属经理到最高级别经理的每位经理的邮箱。 |
dottedLineReports.personId |
字符串 |
是 |
否 |
否 |
否 |
人员的虚线汇报对象 ( |
dottedLineReports.email |
字符串 |
是 |
否 |
否 |
否 |
人员的虚线汇报对象 ( |
topCoworkers.personId |
字符串 |
是 |
否 |
否 |
否 |
该人员的同事 ( |
topCoworkers.affinityScore |
数值 |
是 |
否 |
否 |
否 |
人员相对于同事的亲和性得分(用于排名)。 |
admins.personId |
字符串 |
是 |
否 |
否 |
否 |
分配给该人员的管理员 ( |
admins.email |
字符串 |
是 |
否 |
否 |
否 |
分配给该人员的管理员 ( |
websites.type |
字符串 |
是 |
否 |
否 |
否 |
人员的网站类型,例如“work”“blog”或“other”。 |
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"}}}}