Reference documentation and code samples for the BigQuery Data Policy Service V1 API class Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy.
The data masking policy that is used to specify data masking rule.
Note: The following fields are mutually exclusive: predefined_expression, routine. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: predefined_expression, routine. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: predefined_expression, routine. If a field in that set is populated, all other fields in the set will automatically be cleared.
#routine
defroutine()->::String
Returns
(::String) — The name of the BigQuery routine that contains the custom masking
routine, in the format of
projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}.
Note: The following fields are mutually exclusive: routine, predefined_expression. If a field in that set is populated, all other fields in the set will automatically be cleared.
#routine=
defroutine=(value)->::String
Parameter
value (::String) — The name of the BigQuery routine that contains the custom masking
routine, in the format of
projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}.
Note: The following fields are mutually exclusive: routine, predefined_expression. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — The name of the BigQuery routine that contains the custom masking
routine, in the format of
projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}.
Note: The following fields are mutually exclusive: routine, predefined_expression. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# BigQuery Data Policy Service V1 API - Class Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [1.0.1](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/1.0.1/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.10.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.10.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.9.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.9.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.8.1](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.8.1/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.7.2](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.7.2/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.6.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.6.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.5.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.5.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.4.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.4.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.3.1](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.3.1/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.2.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.2.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy)\n- [0.1.0](/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/0.1.0/Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy) \nReference documentation and code samples for the BigQuery Data Policy Service V1 API class Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy.\n\nThe data masking policy that is used to specify data masking rule. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #predefined_expression\n\n def predefined_expression() -\u003e ::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression\n\n**Returns**\n\n- ([::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression](./Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy-PredefinedExpression)) --- A predefined masking expression.\n\n\n Note: The following fields are mutually exclusive: `predefined_expression`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #predefined_expression=\n\n def predefined_expression=(value) -\u003e ::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression](./Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy-PredefinedExpression)) --- A predefined masking expression.\n\n\nNote: The following fields are mutually exclusive: `predefined_expression`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression](./Google-Cloud-Bigquery-DataPolicies-V1-DataMaskingPolicy-PredefinedExpression)) --- A predefined masking expression.\n\n\n Note: The following fields are mutually exclusive: `predefined_expression`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #routine\n\n def routine() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The name of the BigQuery routine that contains the custom masking routine, in the format of `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.\n\n\n Note: The following fields are mutually exclusive: `routine`, `predefined_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #routine=\n\n def routine=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The name of the BigQuery routine that contains the custom masking routine, in the format of `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.\n\n\nNote: The following fields are mutually exclusive: `routine`, `predefined_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- The name of the BigQuery routine that contains the custom masking routine, in the format of `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.\n\n\n Note: The following fields are mutually exclusive: `routine`, `predefined_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]