[[["易于理解","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-07-08。"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.TABLE_OPTIONS\u003c/code\u003e view provides detailed information about each option for every table or view within a dataset, with one row per option.\u003c/p\u003e\n"],["\u003cp\u003eTo query the \u003ccode\u003eINFORMATION_SCHEMA.TABLE_OPTIONS\u003c/code\u003e view, you need specific IAM permissions, including \u003ccode\u003ebigquery.tables.get\u003c/code\u003e, \u003ccode\u003ebigquery.tables.list\u003c/code\u003e, \u003ccode\u003ebigquery.routines.get\u003c/code\u003e, and \u003ccode\u003ebigquery.routines.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 \u003ccode\u003eroles/bigquery.metadataViewer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe schema for \u003ccode\u003eINFORMATION_SCHEMA.TABLE_OPTIONS\u003c/code\u003e includes columns such as \u003ccode\u003eTABLE_CATALOG\u003c/code\u003e, \u003ccode\u003eTABLE_SCHEMA\u003c/code\u003e, \u003ccode\u003eTABLE_NAME\u003c/code\u003e, \u003ccode\u003eOPTION_NAME\u003c/code\u003e, \u003ccode\u003eOPTION_TYPE\u003c/code\u003e, and \u003ccode\u003eOPTION_VALUE\u003c/code\u003e, which together describe the project, dataset, table/view, option name, its type, and its value.\u003c/p\u003e\n"],["\u003cp\u003eThis view details various options for tables, including metadata like \u003ccode\u003edescription\u003c/code\u003e, \u003ccode\u003eexpiration_timestamp\u003c/code\u003e, and \u003ccode\u003efriendly_name\u003c/code\u003e, as well as specific settings for external tables such as \u003ccode\u003eallow_jagged_rows\u003c/code\u003e, \u003ccode\u003ecompression\u003c/code\u003e, \u003ccode\u003eformat\u003c/code\u003e, and \u003ccode\u003emax_bad_records\u003c/code\u003e, among others.\u003c/p\u003e\n"],["\u003cp\u003eQueries against this view require either a dataset or a region qualifier, with necessary permissions for the dataset or project depending on the qualifier used.\u003c/p\u003e\n"]]],[],null,["# TABLE_OPTIONS view\n==================\n\nThe `INFORMATION_SCHEMA.TABLE_OPTIONS` view contains one row for each option,\nfor each table or view in a dataset. The `TABLES`\nand `TABLE_OPTIONS` views also contain high-level information about views.\nFor detailed information, query the\n[`INFORMATION_SCHEMA.VIEWS`](/bigquery/docs/information-schema-views) view.\n\nRequired permissions\n--------------------\n\nTo query the `INFORMATION_SCHEMA.TABLE_OPTIONS` view, you need the following\nIdentity and Access Management (IAM) permissions:\n\n- `bigquery.tables.get`\n- `bigquery.tables.list`\n- `bigquery.routines.get`\n- `bigquery.routines.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.metadataViewer`\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.TABLE_OPTIONS` view, the query results\ncontain one row for each option, for each table or view in a dataset. For\ndetailed information about\nviews, query the\n[`INFORMATION_SCHEMA.VIEWS` view](/bigquery/docs/information-schema-views)\ninstead.\n\nThe `INFORMATION_SCHEMA.TABLE_OPTIONS` view has the following schema:\n\n##### Options table\n\nFor external tables, the following options are possible:\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\n##### Example 1:\n\nThe following example retrieves the default table expiration times for all\ntables in `mydataset` in your default project (`myproject`) by querying the\n`INFORMATION_SCHEMA.TABLE_OPTIONS` view.\n\nTo run the query against a project other than your default project, add the\nproject ID to the dataset in the following 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, ```myproject`.mydataset.INFORMATION_SCHEMA.TABLE_OPTIONS``.\n**Note:** `INFORMATION_SCHEMA` view names are case-sensitive. \n\n```googlesql\n SELECT\n *\n FROM\n mydataset.INFORMATION_SCHEMA.TABLE_OPTIONS\n WHERE\n option_name = 'expiration_timestamp';\n```\n\nThe result is similar to the following:\n\n\u003cbr /\u003e\n\n```\n +----------------+---------------+------------+----------------------+-------------+--------------------------------------+\n | table_catalog | table_schema | table_name | option_name | option_type | option_value |\n +----------------+---------------+------------+----------------------+-------------+--------------------------------------+\n | myproject | mydataset | mytable1 | expiration_timestamp | TIMESTAMP | TIMESTAMP \"2020-01-16T21:12:28.000Z\" |\n | myproject | mydataset | mytable2 | expiration_timestamp | TIMESTAMP | TIMESTAMP \"2021-01-01T21:12:28.000Z\" |\n +----------------+---------------+------------+----------------------+-------------+--------------------------------------+\n \n```\n\n\u003cbr /\u003e\n\n| **Note:** Tables without an expiration time are excluded from the query results.\n\n##### Example 2:\n\nThe following example retrieves metadata about all tables in `mydataset` that\ncontain test data. The query uses the values in the `description` option to find\ntables that contain \"test\" anywhere in the description. `mydataset` is in your\ndefault project --- `myproject`.\n\nTo run the query against a project other than your default project, add the\nproject ID to the dataset in the following 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```myproject`.mydataset.INFORMATION_SCHEMA.TABLE_OPTIONS``. \n\n```googlesql\n SELECT\n *\n FROM\n mydataset.INFORMATION_SCHEMA.TABLE_OPTIONS\n WHERE\n option_name = 'description'\n AND option_value LIKE '%test%';\n```\n\nThe result is similar to the following:\n\n\u003cbr /\u003e\n\n```\n +----------------+---------------+------------+-------------+-------------+--------------+\n | table_catalog | table_schema | table_name | option_name | option_type | option_value |\n +----------------+---------------+------------+-------------+-------------+--------------+\n | myproject | mydataset | mytable1 | description | STRING | \"test data\" |\n | myproject | mydataset | mytable2 | description | STRING | \"test data\" |\n +----------------+---------------+------------+-------------+-------------+--------------+\n \n```\n\n\u003cbr /\u003e"]]