Send feedback
BigQuery Data Policy v1 API - Enum DataMaskingPolicy.Types.PredefinedExpression (1.2.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.2.0 keyboard_arrow_down
public enum DataMaskingPolicy . Types . PredefinedExpression
Namespace
Google.Cloud.BigQuery.DataPolicies.V1
Assembly
Google.Cloud.BigQuery.DataPolicies.V1.dll
Fields
Name Description AlwaysNull
Masking expression to replace data with NULLs.
DateYearMask
Masking expression to only show the year of Date
,
DateTime
and TimeStamp
. For example, with the
year 2076:
DATE : 2076-01-01
DATETIME : 2076-01-01T00:00:00
TIMESTAMP : 2076-01-01 00:00:00 UTC
Truncation occurs according to the UTC time zone. To change this, adjust
the default time zone using the time_zone
system variable.
For more information, see the <a
href="https://cloud.google.com/bigquery/docs/reference/system-variables">System
variables reference</a>.
DefaultMaskingValue
Masking expression to replace data with their default masking values.
The default masking values for each type listed as below:
STRING: ""
BYTES: b''
INTEGER: 0
FLOAT: 0.0
NUMERIC: 0
BOOLEAN: FALSE
TIMESTAMP: 1970-01-01 00:00:00 UTC
DATE: 1970-01-01
TIME: 00:00:00
DATETIME: 1970-01-01T00:00:00
GEOGRAPHY: POINT(0 0)
BIGNUMERIC: 0
ARRAY: []
STRUCT: NOT_APPLICABLE
JSON: NULL
EmailMask
Masking expression for email addresses.
The masking behavior is as follows:
Syntax-valid email address: Replace username with XXXXX. For example,
cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com.
Syntax-invalid email address: Apply SHA-256 hash.
For more information, see Email
mask .
FirstFourCharacters
Masking expression shows the first four characters of text.
The masking behavior is as follows:
If text length > 4 characters: Replace text with XXXXX, prepend first
four characters of original text.
If text length <= 4 characters: Apply SHA-256 hash.
LastFourCharacters
Masking expression shows the last four characters of text.
The masking behavior is as follows:
If text length > 4 characters: Replace text with XXXXX, append last
four characters of original text.
If text length <= 4 characters: Apply SHA-256 hash.
Sha256
Masking expression to replace data with SHA-256 hash.
Unspecified
Default, unspecified predefined expression. No masking will take place
since no expression is specified.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-19 UTC.
Need to tell us more?
[[["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 2024-12-19 UTC."],[],[]]