INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS 뷰에는 데이터 세트의 테이블에 있는 검색 색인 생성 열에 설정된 각 옵션에 대해 하나의 행이 포함되어 있습니다.
필수 권한
검색 색인 메타데이터를 보려면 색인이 있는 테이블에 대한 bigquery.tables.get 또는 bigquery.tables.list Identity and Access Management(IAM) 권한이 필요합니다. 다음과 같은 사전 정의된 IAM 역할에는 이러한 권한 중 하나 이상이 포함되어 있습니다.
선택사항: PROJECT_ID: Google Cloud 프로젝트의 ID입니다. 지정하지 않으면 기본 프로젝트가 사용됩니다.
DATASET_ID: 데이터 세트의 ID입니다. 자세한 내용은 데이터 세트 한정자를 참조하세요.
예시
-- Returns metadata for search index column options in a single dataset.SELECT*FROMmyDataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS;
예
다음 예시에서는 기본 색인 열 세분성을 COLUMN로 설정하고 col2 및 col3의 세분성을 각각 GLOBAL 및 COLUMN로 개별적으로 설정합니다. 이 예에서는 세부사항이 명시적으로 설정되어 있으므로 col2 및 col3 열이 결과에 표시됩니다. col1 열은 기본 세부사항을 사용하므로 세부사항이 표시되지 않습니다.
[[["이해하기 쉬움","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)"],[],[],null,["# SEARCH_INDEX_COLUMN_OPTIONS view\n================================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS` view contains one row for\neach option set on a search-indexed column in the tables 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_COLUMN_OPTIONS` view, the query results contain one row for each option set on a search-indexed column in the tables in a dataset.\n\n\u003cbr /\u003e\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEX_OPTIONS` 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 index column options in a single dataset.\n SELECT * FROM myDataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS;\n\nExample\n-------\n\nThe following example sets the default index column granularity to `COLUMN`, and\nindividually sets the granularity for `col2` and `col3` to `GLOBAL` and `COLUMN`\nrespectively. In this example, columns `col2` and `col3` appear in the results\nbecause their granularity is set explicitly. The granularity for column\n`col1` is not shown because it uses the default granularity. \n\n```sql\nCREATE SEARCH INDEX index1 ON `mydataset.table1` (\n ALL COLUMNS WITH COLUMN OPTIONS (\n col2 OPTIONS(index_granularity = 'GLOBAL'),\n col3 OPTIONS(index_granularity = 'COLUMN')\n )\n)\nOPTIONS(\n default_index_column_granularity = 'COLUMN'\n);\n\nSELECT\n index_column_name, option_name, option_type, option_value\nFROM\n mydataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS\nWHERE\n index_schema = 'mydataset' AND index_name = 'index1' AND table_name = 'table1';\n```\n\nThe result is similar to the following: \n\n```\n+-------------------+-------------------+---------------+--------------+\n| index_column_name | option_name | option_type | option_value |\n+-------------------+-------------------+---------------+--------------+\n| col2 | index_granularity | STRING | GLOBAL |\n| col3 | index_granularity | STRING | COLUMN |\n+-------------------+-------------------+---------------+--------------+\n```\n\nThe following equivalent example, which doesn't use `ALL COLUMNS`, sets the\ndefault index column granularity to\n`COLUMN` and individually sets the granularity for two columns to `GLOBAL` and\n`COLUMN` respectively: \n\n```sql\nCREATE SEARCH INDEX index1 ON `mydataset.table1` (\n col1,\n col2 OPTIONS(index_granularity = 'GLOBAL'),\n col3 OPTIONS(index_granularity = 'COLUMN')\n)\nOPTIONS(\n default_index_column_granularity = 'COLUMN'\n);\n\nSELECT\n index_column_name, option_name, option_type, option_value\nFROM\n mydataset.INFORMATION_SCHEMA.SEARCH_INDEX_COLUMN_OPTIONS\nWHERE\n index_schema = 'mydataset' AND index_name = 'index1' AND table_name = 'table1';\n```\n\nThe result is similar to the following: \n\n```\n+-------------------+-------------------+---------------+--------------+\n| index_column_name | option_name | option_type | option_value |\n+-------------------+-------------------+---------------+--------------+\n| col2 | index_granularity | STRING | GLOBAL |\n| col3 | index_granularity | STRING | COLUMN |\n+-------------------+-------------------+---------------+--------------+\n```"]]