[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eAuthorized views are subsets of Bigtable tables that provide granular control over data access, enabling the management of both read and write permissions.\u003c/p\u003e\n"],["\u003cp\u003eAuthorized views can be defined by specifying row key prefixes, column qualifier prefixes, specific column qualifiers, or a combination of row key prefixes and column qualifiers.\u003c/p\u003e\n"],["\u003cp\u003eTo include all columns in a family or all rows in a table within an authorized view, the empty string (\u003ccode\u003e""\u003c/code\u003e) should be used as the column qualifier prefix or row key prefix, respectively.\u003c/p\u003e\n"],["\u003cp\u003eBigtable authorized views allow up to 10 distinct column qualifier prefixes, per view, across one or more column families, and the use of sensitive information in row key or column qualifier values should be avoided.\u003c/p\u003e\n"],["\u003cp\u003eDefinition files are written in JSON format, and provide the logic for how the view will be constructed, allowing you to specify the rows and columns to be included in the authorized view.\u003c/p\u003e\n"]]],[],null,["# Overview of authorized views\n============================\n\n*Authorized views* of Bigtable tables give you\nfine-grained access control of your Bigtable data. An\nauthorized view is a subset of a table that you configure to include\nspecific table data. Then you grant access to the authorized view\nseparately from access to the table.\n\nAuthorized views are useful for multi-tenant tables or other\nsituations when your table contains data that not all users should be able to\naccess. Unlike views in other database services, Bigtable\nauthorized views can be used to control **both read and write access**. You\ncan create thousands of authorized views programmatically, in the same way\nyou can with what other storage systems call \"updateable views\" or \"filtered\naliases.\"\n\nThis document describes authorized views and provides examples of definition\nfiles. Before you read this document,\nyou should be familiar with the [Bigtable\nstorage\nmodel](/bigtable/docs/overview#storage-model). For instructions,\nsee [Create and manage authorized views](/bigtable/docs/authorized-views-create-manage).\n\nWhat defines an authorized view\n-------------------------------\n\nWhen you create an authorized view, you define it by specifying the data\nto include in the authorized view using one of the following parameters:\n\n- Row key prefix - for example, all rows that start with `examplepetstore1|`\n- Column qualifier prefix - for example, all columns whose qualifiers start with `order#` in the specified column family\n- Column qualifier - for example, only the `order-examplepetstore` column in the specified column family\n- A combination of row key prefix and column qualifier\n\nIf the same column qualifier is used in multiple column families and you want to\ninclude *all* columns with that qualifier in the view, you must specify every\ncombination of column qualifier and column family separately when you define the\nview.\n\nThe row key and column qualifier values that you use to define an\nauthorized view are treated as service data. For this reason, don't\ncreate an authorized view using row key or column qualifier values that\ncontain [sensitive information](/bigtable/docs/schema-design#privacy). For\ninformation about how service data is handled, see the [Google Cloud Privacy\nNotice](/terms/cloud-privacy-notice).\n\n### Inclusion of columns in a family or all rows\n\nIf you want to make sure that any column that is added to a column family in the\nunderlying table is also included in your authorized view, then you\nshould specify the empty string (`\"\"`) as a column qualifier prefix. For\nexample, a definition file would include this in the family subset:\n`\"qualifierPrefixes\": [\"\"]`.\n\nSimilarly, if you want to define an authorized view that includes all\nrows in the table, specify the empty string (`\"\"`) as a row key prefix. In a\ndefinition file, this is written as `\"rowPrefixes\": [\"\"]` in the view subset.\n\nTo avoid excessively complex authorized views, Bigtable lets\nyou specify at most 10 distinct qualifier prefixes. This means that an\nauthorized view can specify one column family with 10 qualifier\nprefixes, 10 column families with a single qualifier prefix, or anywhere in\nbetween as long as the total number of qualifiers is at most 10.\n\nAs a best practice, specify a key only once per JSON object. If you specify a\nkey, such as a column family name, more than once, the final entry for the key\noverwrites any previous entries for the key.\n\nDefinition file examples\n------------------------\n\nThis section presents JSON-formatted examples of authorized view\ndefinition files.\n\nThe following is an example of a definition file for an authorized view\nthat includes the `address` column of the `customer` column family and columns\nthat begin with `tel` for rows with a row key prefix of `examplepetstore1#`. \n\n {\n \"subsetView\":\n {\n \"rowPrefixes\": [\"examplepetstore1#\"],\n \"familySubsets\":\n {\n \"customer\":\n {\n \"qualifiers\":[\"address\"],\n \"qualifierPrefixes\":[\"tel\"]\n }\n }\n },\n \"deletionProtection\": true\n }\n\nThe following is an example of a definition file for an authorized view\nthat includes the `skus` column in the `order` column family and all columns in\nthe `customer` column family. \n\n {\n \"subsetView\": {\n \"rowPrefixes\": [\"\"],\n \"familySubsets\": {\n \"order\": {\n \"qualifiers\": [\"skus\"]\n },\n \"customer\": {\n \"qualifierPrefixes\": [\"\"]\n }\n }\n }\n }\n\nThe following is an example of a definition file for an authorized view\nthat includes only data in the `skus` column in the `order`\ncolumn family in rows that have a row key prefix of `examplepetstore1#`. \n\n {\n \"subsetView\": {\n \"rowPrefixes\": [\"examplepetstore1#\"]\n \"familySubsets\": {\n \"order\": {\n \"qualifiers\": [\"skus\"]\n }\n }\n }\n }\n\nThe following is an example of a definition file for an authorized view\nthat includes only data in the `skus` and `agents` columns in the `order`\ncolumn family and the `dog`, `cat`, and `bird` columns in the `pet_id`\ncolumn family. \n\n {\n \"subsetView\": {\n \"rowPrefixes\": [\"\"]\n \"familySubsets\": {\n \"order\": {\n \"qualifiers\": [\"skus\", \"agents\"]\n \"pet_id\": {\n \"qualifiers\": [\"dog\", \"cat\", \"bird\"]\n }\n }\n }\n }\n }\n\nWhat's next\n-----------\n\n- [Delete data through an authorized view.](/bigtable/docs/delete-data#delete-authorized-view)\n- [Learn how to tag Bigtable resources.](/bigtable/docs/tags)"]]