[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-24。"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.COLUMN_FIELD_PATHS\u003c/code\u003e view provides metadata for each column nested within \u003ccode\u003eRECORD\u003c/code\u003e or \u003ccode\u003eSTRUCT\u003c/code\u003e columns.\u003c/p\u003e\n"],["\u003cp\u003eQuerying this view requires either \u003ccode\u003ebigquery.tables.get\u003c/code\u003e or \u003ccode\u003ebigquery.tables.list\u003c/code\u003e IAM permissions, which are included in roles like \u003ccode\u003eroles/bigquery.admin\u003c/code\u003e and \u003ccode\u003eroles/bigquery.dataViewer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach row in the query result represents a nested column and contains details such as \u003ccode\u003eTABLE_CATALOG\u003c/code\u003e, \u003ccode\u003eTABLE_SCHEMA\u003c/code\u003e, \u003ccode\u003eTABLE_NAME\u003c/code\u003e, \u003ccode\u003eCOLUMN_NAME\u003c/code\u003e, \u003ccode\u003eFIELD_PATH\u003c/code\u003e, \u003ccode\u003eDATA_TYPE\u003c/code\u003e, and \u003ccode\u003eDESCRIPTION\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eQueries must include a dataset or region qualifier, with corresponding permissions for the dataset or project, and the query execution location must match the \u003ccode\u003eINFORMATION_SCHEMA\u003c/code\u003e view's region.\u003c/p\u003e\n"],["\u003cp\u003eThe content of this view is exemplified by a query against the public \u003ccode\u003ecommits\u003c/code\u003e table, showing data for the \u003ccode\u003eauthor\u003c/code\u003e and \u003ccode\u003edifference\u003c/code\u003e columns with their nested fields and data types.\u003c/p\u003e\n"]]],[],null,["# COLUMN_FIELD_PATHS view\n=======================\n\nThe `INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` view contains one row for each column\n[nested](/bigquery/docs/nested-repeated) within a `RECORD` (or `STRUCT`) column.\n\nRequired permissions\n--------------------\n\nTo query the `INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` view, you need the following\nIdentity and Access Management (IAM) permissions:\n\n- `bigquery.tables.get`\n- `bigquery.tables.list`\n\nEach of the following predefined IAM roles includes the preceding\npermissions:\n\n- `roles/bigquery.admin`\n- `roles/bigquery.dataViewer`\n- `roles/bigquery.dataEditor`\n- `roles/bigquery.metadataViewer`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nQuery results contain one row for each column\n[nested](/bigquery/docs/nested-repeated) within a `RECORD` (or\n`STRUCT`) column.\n\nWhen you query the `INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` view, the query\nresults contain one row for each column\n[nested](/bigquery/docs/nested-repeated) within a `RECORD`\n(or `STRUCT`) column.\n\nThe `INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must include a dataset or a region qualifier. For\nqueries with a dataset qualifier, you must have permissions for the dataset.\nFor queries with a region qualifier, you must have permissions for the project.\nFor more\ninformation see [Syntax](/bigquery/docs/information-schema-intro#syntax).\nThe following table explains the region and resource scopes for this view:\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: any [dataset region name](/bigquery/docs/locations). For example, ```region-us```.\n- \u003cvar translate=\"no\"\u003eDATASET_ID\u003c/var\u003e: the ID of your dataset. For more information, see [Dataset qualifier](/bigquery/docs/information-schema-intro#dataset_qualifier).\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\nExample\n-------\n\nThe following example retrieves metadata from the\n`INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` view for the `commits` table in the\n[`github_repos` dataset](https://console.cloud.google.com/bigquery?p=bigquery-public-data&d=github_repos&page=dataset).\nThis dataset is part of the BigQuery\n[public dataset program](https://cloud.google.com/public-datasets/).\n\nBecause the table you're querying is in another project, the\n`bigquery-public-data` project, you add the project ID to the dataset in the\nfollowing format:\n```````\u003cvar translate=\"no\"\u003eproject_id\u003c/var\u003e````.```\u003cvar translate=\"no\"\u003edataset\u003c/var\u003e```.INFORMATION_SCHEMA.```\u003cvar translate=\"no\"\u003eview\u003c/var\u003e;\nfor example,\n```bigquery-public-data`.github_repos.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS``.\n\nThe `commits` table contains the following nested and nested and repeated\ncolumns:\n\n- `author`: nested `RECORD` column\n- `committer`: nested `RECORD` column\n- `trailer`: nested and repeated `RECORD` column\n- `difference`: nested and repeated `RECORD` column\n\nTo view metadata about the `author` and `difference` columns, run the following query.\n**Note:** `INFORMATION_SCHEMA` view names are case-sensitive. \n\n```googlesql\nSELECT\n *\nFROM\n `bigquery-public-data`.github_repos.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS\nWHERE\n table_name = 'commits'\n AND (column_name = 'author' OR column_name = 'difference');\n```\n\nThe result is similar to the following. For readability, some columns\nare excluded from the result.\n\n\u003cbr /\u003e\n\n```\n +------------+-------------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------------+\n | table_name | column_name | field_path | data_type | description | policy_tags |\n +------------+-------------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------------+\n | commits | author | author | STRUCT\u003cname STRING, email STRING, time_sec INT64, tz_offset INT64, date TIMESTAMP\u003e | NULL | 0 rows |\n | commits | author | author.name | STRING | NULL | 0 rows |\n | commits | author | author.email | STRING | NULL | 0 rows |\n | commits | author | author.time_sec | INT64 | NULL | 0 rows |\n | commits | author | author.tz_offset | INT64 | NULL | 0 rows |\n | commits | author | author.date | TIMESTAMP | NULL | 0 rows |\n | commits | difference | difference | ARRAY\u003cSTRUCT\u003cold_mode INT64, new_mode INT64, old_path STRING, new_path STRING, old_sha1 STRING, new_sha1 STRING, old_repo STRING, new_repo STRING\u003e\u003e | NULL | 0 rows |\n | commits | difference | difference.old_mode | INT64 | NULL | 0 rows |\n | commits | difference | difference.new_mode | INT64 | NULL | 0 rows |\n | commits | difference | difference.old_path | STRING | NULL | 0 rows |\n | commits | difference | difference.new_path | STRING | NULL | 0 rows |\n | commits | difference | difference.old_sha1 | STRING | NULL | 0 rows |\n | commits | difference | difference.new_sha1 | STRING | NULL | 0 rows |\n | commits | difference | difference.old_repo | STRING | NULL | 0 rows |\n | commits | difference | difference.new_repo | STRING | NULL | 0 rows |\n +------------+-------------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------------+\n \n```\n\n\u003cbr /\u003e"]]