INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS 뷰에는 데이터 세트의 각 테이블에 대한 검색 색인 생성 열마다 행이 하나씩 포함됩니다.
필수 권한
검색 색인 메타데이터를 보려면 색인이 있는 테이블에 대한 bigquery.tables.get 또는 bigquery.tables.list Identity and Access Management(IAM) 권한이 필요합니다. 다음과 같은 사전 정의된 IAM 역할에는 이러한 권한 중 하나 이상이 포함되어 있습니다.
다음 쿼리는 색인이 생성되는 필드에 대한 정보를 추출합니다.
index_field_path는 색인이 생성되는 열의 필드를 나타냅니다. 색인이 생성된 필드의 전체 경로가 제공되는 STRUCT의 경우에만 index_column_name과 다릅니다. 이 예시에서 c 열에는 ARRAY<STRING> 필드 e와 STRING 필드 g가 포함된 f라는 다른 STRUCT가 포함되어 있으며 각각 색인이 생성됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS\u003c/code\u003e view provides metadata for each search-indexed column within a dataset, with one row per indexed column.\u003c/p\u003e\n"],["\u003cp\u003eAccess to this view requires specific IAM permissions, namely \u003ccode\u003ebigquery.tables.get\u003c/code\u003e or \u003ccode\u003ebigquery.tables.list\u003c/code\u003e, which are included in roles such as \u003ccode\u003eroles/bigquery.admin\u003c/code\u003e, \u003ccode\u003eroles/bigquery.dataViewer\u003c/code\u003e, and others.\u003c/p\u003e\n"],["\u003cp\u003eEach row in the view's schema includes details like \u003ccode\u003eindex_catalog\u003c/code\u003e (project name), \u003ccode\u003eindex_schema\u003c/code\u003e (dataset name), \u003ccode\u003etable_name\u003c/code\u003e, \u003ccode\u003eindex_name\u003c/code\u003e, \u003ccode\u003eindex_column_name\u003c/code\u003e, and \u003ccode\u003eindex_field_path\u003c/code\u003e which specifies the exact location of the indexed field.\u003c/p\u003e\n"],["\u003cp\u003eQueries on this view must include a dataset qualifier and are scoped to the dataset level and its location, as demonstrated by the example \u003ccode\u003emyDataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eindex_field_path\u003c/code\u003e differentiates itself from \u003ccode\u003eindex_column_name\u003c/code\u003e when it comes to structs, by providing the full path to the indexed field within the struct.\u003c/p\u003e\n"]]],[],null,["# SEARCH_INDEX_COLUMNS view\n=========================\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS` view contains one row for each\nsearch-indexed column on each table in a dataset.\n\nRequired permissions\n--------------------\n\nTo see [search index](/bigquery/docs/search-index) metadata, you need the\n`bigquery.tables.get` or `bigquery.tables.list` Identity and Access Management (IAM)\npermission on the table with the index. Each of the following predefined\nIAM roles includes at least one of these permissions:\n\n- `roles/bigquery.admin`\n- `roles/bigquery.dataEditor`\n- `roles/bigquery.dataOwner`\n- `roles/bigquery.dataViewer`\n- `roles/bigquery.metadataViewer`\n- `roles/bigquery.user`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nWhen you query the `INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS` view, the query results contain one row for each indexed column on each table in a dataset.\n\n\u003cbr /\u003e\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must have a [dataset qualifier](/bigquery/docs/information-schema-intro#syntax). The\nfollowing table explains the region scope 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\"\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**Example** \n\n -- Returns metadata for search indexes in a single dataset.\n SELECT * FROM myDataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS;\n\nExamples\n--------\n\nThe following example creates a search index on all columns of `my_table`. \n\n```googlesql\nCREATE TABLE dataset.my_table(\n a STRING,\n b INT64,\n c STRUCT \u003cd INT64,\n e ARRAY\u003cSTRING\u003e,\n f STRUCT\u003cg STRING, h INT64\u003e\u003e) AS\nSELECT 'hello' AS a, 10 AS b, (20, ['x', 'y'], ('z', 30)) AS c;\n\nCREATE SEARCH INDEX my_index\nON dataset.my_table(ALL COLUMNS);\n```\n\nThe following query extracts information on which fields are indexed.\nThe `index_field_path` indicates which field of a column is\nindexed. This differs from the `index_column_name` only in the case of a\n`STRUCT`, where the full path to the indexed field is given. In this example,\ncolumn `c` contains an `ARRAY\u003cSTRING\u003e` field `e` and another `STRUCT` called\n`f` which contains a `STRING` field `g`, each of which is indexed. \n\n SELECT table_name, index_name, index_column_name, index_field_path\n FROM my_project.dataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS\n\nThe result is similar to the following: \n\n```\n+------------+------------+-------------------+------------------+\n| table_name | index_name | index_column_name | index_field_path |\n+------------+------------+-------------------+------------------+\n| my_table | my_index | a | a |\n| my_table | my_index | c | c.e |\n| my_table | my_index | c | c.f.g |\n+------------+------------+-------------------+------------------+\n```\n\nThe following query joins the `INFORMATION_SCHEMA.SEARCH_INDEX_COUMNS` view with\nthe `INFORMATION_SCHEMA.SEARCH_INDEXES` and `INFORMATION_SCHEMA.COLUMNS` views\nto include the search index status and the data type of each column: \n\n```googlesql\nSELECT\n index_columns_view.index_catalog AS project_name,\n index_columns_view.index_SCHEMA AS dataset_name,\n indexes_view.TABLE_NAME AS table_name,\n indexes_view.INDEX_NAME AS index_name,\n indexes_view.INDEX_STATUS AS status,\n index_columns_view.INDEX_COLUMN_NAME AS column_name,\n index_columns_view.INDEX_FIELD_PATH AS field_path,\n columns_view.DATA_TYPE AS data_type\nFROM\n mydataset.INFORMATION_SCHEMA.SEARCH_INDEXES indexes_view\nINNER JOIN\n mydataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMNS index_columns_view\n ON\n indexes_view.TABLE_NAME = index_columns_view.TABLE_NAME\n AND indexes_view.INDEX_NAME = index_columns_view.INDEX_NAME\nLEFT OUTER JOIN\n mydataset.INFORMATION_SCHEMA.COLUMNS columns_view\n ON\n indexes_view.INDEX_CATALOG = columns_view.TABLE_CATALOG\n AND indexes_view.INDEX_SCHEMA = columns_view.TABLE_SCHEMA\n AND index_columns_view.TABLE_NAME = columns_view.TABLE_NAME\n AND index_columns_view.INDEX_COLUMN_NAME = columns_view.COLUMN_NAME\nORDER BY\n project_name,\n dataset_name,\n table_name,\n column_name;\n```\n\nThe result is similar to the following: \n\n```\n+------------+------------+----------+------------+--------+-------------+------------+---------------------------------------------------------------+\n| project | dataset | table | index_name | status | column_name | field_path | data_type |\n+------------+------------+----------+------------+--------+-------------+------------+---------------------------------------------------------------+\n| my_project | my_dataset | my_table | my_index | ACTIVE | a | a | STRING |\n| my_project | my_dataset | my_table | my_index | ACTIVE | c | c.e | STRUCT\u003cd INT64, e ARRAY\u003cSTRING\u003e, f STRUCT\u003cg STRING, h INT64\u003e\u003e |\n| my_project | my_dataset | my_table | my_index | ACTIVE | c | c.f.g | STRUCT\u003cd INT64, e ARRAY\u003cSTRING\u003e, f STRUCT\u003cg STRING, h INT64\u003e\u003e |\n+------------+------------+----------+------------+--------+-------------+------------+---------------------------------------------------------------+\n```\n\n\u003cbr /\u003e"]]