- PrivaceraCloud Release 4.5
- PrivaceraCloud User Guide
- PrivaceraCloud
- What is PrivaceraCloud?
- Getting Started with Privacera Cloud
- User Interface
- Dashboard
- Access Manager
- Discovery
- Usage statistics
- Encryption and Masking
- Privacera Encryption core ideas and terminology
- Encryption Schemes
- Encryption Schemes
- System Encryption Schemes Enabled by Default
- View Encryption Schemes
- Formats, Algorithms, and Scopes
- Record the Names of Schemes in Use and Do Not Delete Them
- System Encryption Schemes Enabled by Default
- Viewing the Encryption Schemes
- Formats, Algorithms, and Scopes
- Record the Names of Schemes in Use and Do Not Delete Them
- Encryption Schemes
- Presentation Schemes
- Masking schemes
- Create scheme policies on PrivaceraCloud
- Encryption formats, algorithms, and scopes
- Deprecated encryption formats, algorithms, and scopes
- PEG REST API on PrivaceraCloud
- PEG API Endpoint
- Request Summary for PrivaceraCloud
- Prerequisites
- Anatomy of a PEG API endpoint on PrivaceraCloud
- About constructing the datalist for /protect
- About deconstructing the response from /unprotect
- Example of data transformation with /unprotect and presentation scheme
- Example PEG REST API endpoints for PrivaceraCloud
- Audit details for PEG REST API accesses
- Make calls on behalf of another user on PrivaceraCloud
- Privacera Encryption UDF for masking in Databricks
- Privacera Encryption UDFs for Trino
- Syntax of Privacera Encryption UDFs for Trino
- Prerequisites for installing Privacera Crypto plug-in for Trino
- Variable values to obtain from Privacera
- Determine required paths to crypto jar and crypto.properties
- Download Privacera Crypto Jar
- Set variables in Trino etc/crypto.properties
- Restart Trino to register the Privacera Crypto UDFs for Trino
- Example queries to verify Privacera-supplied UDFs
- Azure AD setup
- Launch Pad
- Settings
- General functions in PrivaceraCloud settings
- Applications
- About applications
- Azure Data Lake Storage Gen 2 (ADLS)
- Athena
- Privacera Discovery with Cassandra
- Databricks
- Databricks SQL
- Dremio
- DynamoDB
- Elastic MapReduce from Amazon
- EMRFS S3
- Files
- File Explorer for Google Cloud Storage
- Glue
- Google BigQuery
- Kinesis
- Lambda
- Microsoft SQL Server
- MySQL for Discovery
- Open Source Spark
- Oracle for Discovery
- PostgreSQL
- Power BI
- Presto
- Redshift
- Redshift Spectrum
- Kinesis
- Snowflake
- Starburst Enterprise with PrivaceraCloud
- Starburst Enterprise Presto
- Trino
- Datasource
- User Management
- API Key
- About Account
- Statistics
- Help
- Apache Ranger API
- Reference
- Okta Setup for SAML-SSO
- Azure AD setup
- SCIM Server User-Provisioning
- AWS Access with IAM
- Access AWS S3 buckets from multiple AWS accounts
- Add UserInfo in S3 Requests sent via Dataserver
- EMR Native Ranger Integration with PrivaceraCloud
- Spark Properties
- Operational Status
- How-to
- Create CloudFormation Stack
- Enable Real-time Scanning of S3 Buckets
- Enable Discovery Realtime Scanning Using IAM Role
- How to configure multiple JSON Web Tokens (JWTs) for EMR
- Enable offline scanning on Azure Data Lake Storage Gen 2 (ADLS)
- Enable Real-time Scanning on Azure Data Lake Storage Gen 2 (ADLS)
- How to Get Support
- Coordinated Vulnerability Disclosure (CVD) Program of Privacera
- Shared Security Model
- PrivaceraCloud
- PrivaceraCloud Previews
- Privacera documentation changelog
Privacera Encryption UDF for masking in Databricks
Privacera Encryption includes a UDF for Databricks that can one-way mask your data. For background, see Masking schemes.
Syntax of Databricks UDF for masking
The masking UDF for Databricks has the following syntax:
Mask: With the quoted '<mask_scheme_name>'
, the mask
UDF one-way transforms all values of <column_name>
in <table_name>
:
select mask(<column_name>, <mask_scheme_name>) from <table_name>;
Prerequisites for Databricks masking UDF
The following should already be ready:
The Privacera init script for Databricks must be installed in your Databricks instance. See Databricks.
A fully functional installation of Databricks.
The users who will use the UDFs have sufficient access to the pertinent tables in Databricks.
Define the mask UDF in Databricks
In your Databricks instance, run the following command to define the mask
UDF:
drop function if exists db.mask; CREATE FUNCTION db.mask AS 'com.privacera.crypto.PrivaceraMaskUDF'
Example query to verify Privacera-supplied mask UDF
See the syntax detailed in Syntax of Databricks UDF for masking.
Mask: The following example query with the mask
UDF one-way transforms the cleartext CUSTOMER_EMAIL
column of the CUSTOMERS
table using the quoted'MASK_SCHEME_EMAIL'
masking scheme:
select mask(CUSTOMER_EMAIL, `MASK_SCHEME_EMAIL`) from CUSTOMERS;
Redact the column email
from the customer_data
database with the masking scheme EMAIL_REDACT_SCHEME
and save the output to a column called RedactedEmail
.
select mask(email,'EMAIL_REDACT_SCHEME') as RedactedEmail db.customer_data;
Single query to encrypt and mask: Encrypt (protect
) the column PERSON_NAM
from the customer_data
database with the PERSON_NAME_ENCRYPTION_SCHEME
and mask the EMAIL
from the customer_data
database with the masking scheme EMAIL_MASKING_SCHEME
. The data are transformed in place with no intermediate location.
select protect(PERSON_NAME,'PERSON_NAME_ENCRYPTION_SCHEME'), mask(EMAIL,'EMAIL_MASKING_SCHEME') from db.customer_data;