Azure Databricks
Big Data Protector on Azure Databricks
The Protegrity Big Data Protector for Azure Databricks delivers end‑to‑end data protection. Organizations deploying the Big Data Protector rely on modern, supported storage options. These include Workspace storage, Unity Catalog Volumes, and cloud object storage like ADLS Gen2 or Azure Blob Storage.
Designed to secure sensitive data across analytics pipelines, the Big Data Protector applies advanced tokenization and encryption during Spark execution and enforces centralized, policy‑driven controls. Whether installed via Unity Catalog Volumes for init script and .tgz delivery, the Protector ensures resilient execution across Azure Databricks clusters.
By embracing cloud‑native storage paths, this approach ensures long‑term compatibility with Databricks platform changes while maintaining Protegrity’s standard of seamless and transparent protection. Organizations can continue to process high‑value datasets on Azure Databricks with confidence knowing that sensitive information is secured across its lifecycle, even as the underlying platform evolves.
The Protegrity Big Data Protector for Azure Databricks empowers organizations to secure sensitive data across their analytics pipelines. This can be achieved by combining high‑performance protection mechanisms with flexible deployment models tailored for modern cloud architectures. Central to this capability are two approaches:
The two approaches provide enterprises the flexibility to choose a data protection strategy aligned with their architectural, cost, and compliance requirements. For example, a fully cluster-local data protection strategy can be leveraged using AP REST. On the other hand, a data protection strategy can also be centrally managed via Cloud Protector, or in hybrid deployments. This dual-path model ensures that Azure Databricks customers can achieve seamless, transparent, policy-based data protection while continuing to extract high-value insights from their data securely and efficiently.
Application Protector REST Approach
The AP REST model enables data protection directly within the Databricks cluster itself, eliminating the need for a separate Cloud API infrastructure. This approach is particularly suitable for customers who want to avoid maintaining additional cloud-native services for protection operations.
With AP REST, protection workflows are executed through REST endpoints running on the cluster, allowing seamless scaling along with Databricks’ auto-scaling compute. This ensures that sensitive data remains protected throughout processing while also adapting automatically to dynamically assigned IPs in auto-scaling environments. This results in an operationally efficient fit for Spark-driven workloads on Azure.
For the Application Protector REST Approach, the following cluster types are supported:
- Databricks Dedicated Compute
- Databricks Standard Compute
For the Application Protector REST approach, the following sections are applicable:
Cloud Protector Approach
The Cloud Protector approach extends protection capabilities by offering centralized, cloud-hosted security services for environments that require externally managed protection layers. It enables highly scalable, policy-driven tokenization and encryption without requiring protection logic to reside inside the Databricks compute itself.
In contexts where Cloud Protector is integrated with the Big Data Protector, organizations benefit from lifecycle-wide protection that spans storage, compute, and inter-system data transfers. Cloud Protector provides the foundation for UDF-driven protections including Spark and Unity Catalog–level enforcement, ensuring centralized governance across distributed analytics ecosystems.
For the Cloud Protector approach, the following cluster types are supported:
- Databricks Dedicated Compute
- Databricks Standard Compute
- Databricks SQL Warehouse
For the Cloud Protector approach, the following sections are applicable:
4 - Installing the Protector
Install the Big Data Protector on Azure Databricks
The process of installing the Big Data Protector involves the process of creating the user-defined functions.
The following combinations will work for a successful execution of the configurator script:
- Databricks Dedicated Compute + Application Protector REST approach
- Databricks Dedicated Compute + Cloud Protector approach
- Databricks Standard Compute + Application Protector REST approach
- Databricks Standard Compute + Cloud Protector approach
- Databricks SQL Warehouse + Cloud Protector approach
The Databricks SQL Warehouse + Application Protector REST approach combination will not work. This is because Protegrity executes a few Python commands on the Databricks Compute to retrieve a listening IP for the Application Protector REST’s Server. When the Databricks Compute is a SQL Warehouse, the Python commands fail to execute. This occurs because the SQL Warehouse supports only SQL commands.
Creating the UDFs for the Application Protector REST Approach
The configurator script creates the UDFs. These Unity Catalog Batch Python UDFs are designed to perform data protection and unprotection operations. Select the required approach and the operation ID to create the UDFs using the Application Protector REST server. This section explains the process to create the UDFs using the interactive method of installation.
To create the UDFs:
Log in to the node having connectivity to ESA/PPC.
Navigate to the directory where the installation files are extracted.
To execute the configurator script, run the following command:
./BigDataProtector-Configurator_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.sh
Press ENTER.
The prompt to enter the operation ID appears.
Creating installation files...
Created installation files.
The ID of the operation needs to be one of the following:
----------------------------------------------------------
| ID | Operation |
----------------------------------------------------------
| 1 | Get Application Protector REST's Server IP |
| 2 | Create Databricks Unity Catalog Batch Python UDFs |
| 3 | Delete Databricks Unity Catalog Batch Python UDFs |
----------------------------------------------------------
Enter the ID of the operation:
To create the UDFs, type 2.
Press ENTER.
The prompt to enter the Databricks Workspace URL appears.
Enter the URL of the Databricks Workspace:
Enter the Databricks Workspace URL.
Press ENTER.
The prompt to enter the application ID of the Databricks Service Principal appears.
Enter the Application ID of the Databricks Service Principal:
Enter the Application ID of the Databricks Service Principal.
Press ENTER.
The prompt to enter the OAuth secret for the Service Principal appears.
Enter the OAuth Secret of the Databricks Service Principal:
Enter the OAuth secret.
Press ENTER.
The prompt to enter the cluster ID appears.
Enter the ID of the Databricks Compute:
Note: The Cluster ID can be either for Standard Compute or Dedicated Compute. For more information about identifying the Cluster ID, refer to Get identifiers for workspace objects.
Enter the Cluster ID.
Press ENTER.
The prompt to enter the name of the schema appears.
Enter the name of the Databricks Unity Catalog Catalog-Schema:
Enter the name of the catalog and the schema in the <catalog_name.schema_name> format.
Press ENTER.
The prompt to select the approach appears.
The ID of the approach needs to be one of the following:
-----------------------------------
| ID | Approach |
-----------------------------------
| 1 | Application Protector REST |
| 2 | Cloud Protector |
-----------------------------------
Enter the ID of the approach:
To create the UDFs using the Application Protector REST approach, type 1.
Press ENTER.
The prompt to enter the path of the CA Certificate appears.
Enter the path of the CA Certificate:
Enter the path of the CA Certificate.
Press ENTER.
The prompt to enter the path of the Server Certificate appears.
Enter the path of the Server Certificate:
Enter the path of the Server Certificate.
Press ENTER.
The prompt to enter the path of the Server key appears.
Enter the path of the Server Key:
Enter the path of the Server Key.
Press ENTER.
The prompt to enter the name of the key vault appears.
Enter the name of the Azure Key Vault:
Enter the name of the Azure Key Vault.
Press ENTER.
The prompt to enter the name of the Service Credential appears.
Enter the name of the Databricks Unity Catalog Service Credential:
Enter the name of the Databricks Unity Catalog Service Credential.
Press ENTER.
The prompt to enter the path of the Unity Catalog Volume appears.
Enter the path of the Databricks Unity Catalog Volume:
Enter the path of the Databricks Unity Catalog Volume.
Press ENTER.
The script creates the UDFs at the specified location.
Executing specified operation...
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_identity-1.25.3-py3-none-any.whl file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_identity-1.25.3-py3-none-any.whl file.
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_keyvault_secrets-4.11.0-py3-none-any.whl file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_keyvault_secrets-4.11.0-py3-none-any.whl file.
Creating <catalog_name>.<schema_name>.pty_decrypt_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_decrypt_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_encrypt_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_encrypt_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_get_version Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_get_version Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_get_version_extended Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_get_version_extended Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_binary Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_binary Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_date Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_date Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_int Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_int Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_smallint Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_smallint Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_string_fpe Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_string_fpe Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_binary Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_binary Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_date Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_date Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_int Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_int Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_smallint Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_smallint Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_string_fpe Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_string_fpe Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_who_am_i Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_who_am_i Databricks Unity Catalog Batch Python UDF.
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/BigDataProtector_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.tgz file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/BigDataProtector_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.tgz file.
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/BigDataProtector-Init-Script_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.sh file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/BigDataProtector-Init-Script_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.sh file.
1. Create the following environment variables in the Spark section of the Advanced properties of the Databricks Compute:
PTY_ESA_IP=PTY_ESA_IP
PTY_ESA_PORT=PTY_ESA_PORT
Either PTY_ESA_TOKEN=PTY_ESA_TOKEN or PTY_ESA_ADMINISTRATOR_USERNAME=PTY_ESA_ADMINISTRATOR_USERNAME and PTY_ESA_ADMINISTRATOR_PASSWORD=PTY_ESA_ADMINISTRATOR_PASSWORD
PTY_AUDIT_STORE_IP_PORT=PTY_AUDIT_STORE_IP_PORT
PTY_PROTECTOR_CONFIGURATION=PTY_PROTECTOR_CONFIGURATION
PTY_ESA_CA_CERTIFICATE=PTY_ESA_CA_CERTIFICATE
PTY_ESA_FQDN=PTY_ESA_FQDN
2. Attach "/Volumes/<catalog_name>/<schema_name>/<volume_name>/BigDataProtector-Init-Script_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.sh" as an Init Script to the Databricks Compute.
3. Restart the Databricks Compute.
Executed specified operation.
Creating the UDFs for the Cloud Protector Approach
The configurator script creates the UDFs. These Unity Catalog Batch Python UDFs can perform data protection and unprotection operations. Select the required approach and the operation ID to create the UDFs using the Cloud Protector. This section explains the process to create the UDFs using the interactive method of installation.
To create the UDFs:
Log in to the node having connectivity to ESA/PPC.
Navigate to the directory where the installation files are extracted.
To execute the configurator script, run the following command:
./BigDataProtector-Configurator_Linux-ALL-64_x86-64_Azure.Databricks-<DBR_version>-64_<BDP_version>.sh
Press ENTER.
The prompt to enter the operation ID appears.
Creating installation files...
Created installation files.
The ID of the operation needs to be one of the following:
----------------------------------------------------------
| ID | Operation |
----------------------------------------------------------
| 1 | Get Application Protector REST's Server IP |
| 2 | Create Databricks Unity Catalog Batch Python UDFs |
| 3 | Delete Databricks Unity Catalog Batch Python UDFs |
----------------------------------------------------------
Enter the ID of the operation:
To create the UDFs, type 2.
Press ENTER.
The prompt to enter the Databricks Workspace URL appears.
Enter the URL of the Databricks Workspace:
Enter the Databricks Workspace URL.
Press ENTER.
The prompt to enter the application ID of the Databricks Service Principal appears.
Enter the Application ID of the Databricks Service Principal:
Enter the Application ID of the Databricks Service Principal.
Press ENTER.
The prompt to enter the OAuth secret for the Service Principal appears.
Enter the OAuth Secret of the Databricks Service Principal:
Enter the OAuth secret.
Press ENTER.
The prompt to enter the cluster ID appears.
Enter the ID of the Databricks Compute:
Note: The Cluster ID can be either for SQL Warehouse, Standard Compute or Dedicated Compute. For more information about identifying the Cluster ID, refer to Get identifiers for workspace objects.
Enter the Cluster ID.
Press ENTER.
The prompt to enter the name of the schema appears.
Enter the name of the Databricks Unity Catalog Catalog-Schema:
Enter the name of the catalog and the schema in the <catalog_name.schema_name> format.
Press ENTER.
The prompt to select the approach appears.
The ID of the approach needs to be one of the following:
-----------------------------------
| ID | Approach |
-----------------------------------
| 1 | Application Protector REST |
| 2 | Cloud Protector |
-----------------------------------
Enter the ID of the approach:
To create the UDFs using the Cloud Protector approach, type 2.
Press ENTER.
The prompt to enter the protection endpoint appears.
Enter the URL of the Azure Function App's Protect Function:
Enter the protection endpoint.
Press ENTER.
The prompt to enter the unprotection endpoint appears.
Enter the URL of the Azure Function App's Unprotect Function:
Enter the unprotection endpoint.
Press ENTER.
The prompt to enter the name of the key vault appears.
Enter the name of the Azure Key Vault:
Enter the name of the Azure Key Vault.
Press ENTER.
The prompt to enter the name of the Service Credential appears.
Enter the name of the Databricks Unity Catalog Service Credential:
Enter the name of the Databricks Unity Catalog Service Credential.
Press ENTER.
The prompt to enter the path of the Unity Catalog volume appears.
Enter the path of the Databricks Unity Catalog Volume:
Enter the location of the Unity Catalog volume.
Press ENTER.
The script creates the UDFs at the specified location.
Executing specified operation...
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_identity-1.25.3-py3-none-any.whl file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_identity-1.25.3-py3-none-any.whl file.
Creating /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_keyvault_secrets-4.11.0-py3-none-any.whl file...
Created /Volumes/<catalog_name>/<schema_name>/<volume_name>/azure_keyvault_secrets-4.11.0-py3-none-any.whl file.
Creating <catalog_name>.<schema_name>.pty_decrypt_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_decrypt_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_encrypt_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_encrypt_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_get_version Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_get_version Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_get_version_extended Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_get_version_extended Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_binary Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_binary Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_date Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_date Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_int Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_int Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_smallint Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_smallint Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_protect_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_protect_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_binary Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_binary Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_date Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_date Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_int Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_int Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_smallint Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_smallint Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_unprotect_string Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_unprotect_string Databricks Unity Catalog Batch Python UDF.
Creating <catalog_name>.<schema_name>.pty_who_am_i Databricks Unity Catalog Batch Python UDF...
Created <catalog_name>.<schema_name>.pty_who_am_i Databricks Unity Catalog Batch Python UDF.
Executed specified operation.
7.1 - Unity Catalog Batch Python UDFs
Understand the Unity Catalog Batch Python UDFs
The UDFs in this section are applicable only to install and configure the Big Data Protector in the Databricks environment.
This version of the build only supports Unity Catalog Batch Python UDFs that use the Application Protector REST and Cloud Protect approaches. The Hive and Spark UDFs and APIs that provide native protection within the cluster nodes are not packaged in this build. To use those features, please use the 9.1.0.0 builds.
pty_who_am_i()
The UDF returns the current user.
Signature:
Parameters:
| Name | Data Type | Description |
|---|
input | STRING | Specifies any random string value to be passed to fetch the current user. |
Result:
- The UDF returns the current user.
pty_get_version()
The UDF returns the current version of the protector.
Signature:
Parameters:
| Name | Data Type | Description |
|---|
input | STRING | Specifies any random string value to be passed to fetch the current version. |
Result:
- The UDF returns the current version of the protector.
Example:
select pty_get_version();
pty_get_version_extended()
The UDF returns the extended version information of the protector.
Signature:
pty_get_version_extended();
Parameters:
| Name | Data Type | Description |
|---|
input | STRING | Specifies any random string value to be passed to fetch the extended version details. |
Result:
The UDF returns a String in the following format:
BDP: <bdp_version>, Application Protector REST: <aprest_version>, Jcore: <jcore_version>, Core: <core_version>;
where:
BDP: is the current version of the ProtectorApplication Protector REST: is the Application Protector REST versionJcore: is the Jcorelite versionCore: is the Core library version
Example:
select pty_get_version_extended();
pty_protect_binary()
The UDF protects the BINARY format data, which is provided as input.
Signature:
pty_protect_binary (input BINARY, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in BINARY format, which needs to be protected. |
data_element | Specifies the data element used to protect the BINARY format data. |
Returns:
The UDF returns the BINARY format data, which is protected.
Example:
SELECT pty_protect_binary(<column_with_binary_data>, "<binary_data_element>");
pty_unprotect_binary()
The UDF unprotects the protected BINARY data, which is provided as an input.
Signature:
pty_unprotect_binary (input BINARY, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in BINARY format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the BINARY format data. |
Returns:
The UDF returns the BINARY format data, which is unprotected.
Example:
SELECT pty_unprotect_binary(<column_with_protected_binary_data>, "<binary_data_element>");
pty_protect_date()
The UDF protects the DATE format data, which is provided as input.
Signature:
pty_protect_date (input DATE, data_element STRING)
Note: The supported DATE format is YYYY-MM-DD.
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in DATE format, which needs to be protected. |
data_element | Specifies the data element used to protect the DATE format data. |
Returns:
The UDF returns the DATE format data, which is protected.
Example:
SELECT pty_protect_date(<column_with_date_data>, "de_datetime");
pty_unprotect_date()
The UDF unprotects the protected DATE data, which is provided as an input.
Signature:
pty_unprotect_date (input DATE, data_element STRING)
Note: The supported DATE format is YYYY-MM-DD.
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in DATE format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the DATE format data. |
Returns:
The UDF returns the DATE format data, which is unprotected.
Example:
SELECT pty_unprotect_date(<column_with_protected_date_data>, "de_datetime");
pty_protect_smallint()
The UDF protects the SMALLINT format data, which is provided as input.
Signature:
pty_protect_smallint (input SMALLINT, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in SMALLINT format, which needs to be protected. |
data_element | Specifies the data element used to protect the SMALLINT format data. |
Returns:
The UDF returns the SMALLINT format data, which is protected.
Example:
SELECT pty_protect_smallint(<column_with_smallint_data>, "de_int2");
pty_unprotect_smallint()
The UDF unprotects the protected SMALLINT data, which is provided as an input.
Signature:
pty_unprotect_smallint (input SMALLINT, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in SMALLINT format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the SMALLINT format data. |
Returns:
The UDF returns the SMALLINT format data, which is unprotected.
Example:
SELECT pty_unprotect_smallint(<column_with_protected_smallint_data>, "de_int2");
pty_protect_int()
The UDF protects the INT format data, which is provided as input.
Signature:
pty_protect_int (input INT, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in INT format, which needs to be protected. |
data_element | Specifies the data element used to protect the INT format data. |
Returns:
The UDF returns the INT format data, which is protected.
Example:
SELECT pty_protect_int(<column_with_int_data>, "de_int4");
pty_unprotect_int()
The UDF unprotects the protected INT data, which is provided as an input.
Signature:
pty_unprotect_int (input INT, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in INT format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the INT format data. |
Returns:
The UDF returns the INT format data, which is unprotected.
Example:
SELECT pty_unprotect_int(<column_with_protected_int_data>, "de_int4");
pty_protect_string()
The UDF protects the STRING format data, which is provided as input.
For BIGINT, DATETIME, DECIMAL, DOUBLE, and FLOAT data types, it is recommended to use the pty_protect_string() UDF.
For example:
SELECT pty_protect_string(CAST(<column_with_input_data> AS STRING), "<data_element>");
It is recommended to use the following data elements corresponding to their input data type:
- For
BIGINT input, use an integer data element.SELECT pty_protect_string(CAST(<column_with_bigint_data> AS STRING), "de_int8");
- For DATETIME input, use the datetime data element.
SELECT pty_protect_string(CAST(<column_with_datetime_data> AS STRING), "de_datetime");
- For
DECIMAL input, use a decimal data element.SELECT pty_protect_string(CAST(<column_with_decimal_data> AS STRING), "de_decimal");
- For
DOUBLE input, either use a decimal, numeric, or a no encryption data element.SELECT pty_protect_string(CAST(<column_with_double_data> AS STRING), "de_decimal");
SELECT pty_protect_string(CAST(<column_with_double_data> AS STRING), "de_numeric");
- For
FLOAT input, either use a decimal, numeric, or a no encryption data element.SELECT pty_protect_string(CAST(<column_with_float_data> AS STRING), "de_decimal");
SELECT pty_protect_string(CAST(<column_with_float_data> AS STRING), "de_numeric");
Signature:
pty_protect_string (input STRING, data_element STRING)
Note: The UDF accepts a maximum input length of 4081 characters.
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in STRING format, which needs to be protected. |
data_element | Specifies the data element used to protect the STRING format data. |
Returns:
The UDF returns the STRING format data, which is protected.
Example:
SELECT pty_protect_string(<column_with_string_data>, "de_alphanum");
pty_unprotect_string()
The UDF unprotects the STRING format data, which is provided as input.
For BIGINT, DATETIME, DECIMAL, DOUBLE, and FLOAT data types, it is recommended to use the pty_unprotect_string() UDF.
For example:
SELECT pty_unprotect_string(CAST(<column_with_protected_data> AS STRING), "<data_element>");
It is recommended to use the following data elements corresponding to their input data type:
- For
BIGINT input, use an integer data element.SELECT pty_unprotect_string(CAST(<column_with_protected_bigint_data> AS STRING), "de_int8");
- For DATETIME input, use the datetime data element.
SELECT pty_unprotect_string(CAST(<column_with_protected_datetime_data> AS STRING), "de_datetime");
- For
DECIMAL input, use a decimal data element.SELECT pty_unprotect_string(CAST(<column_with_protected_decimal_data> AS STRING), "de_decimal");
- For
DOUBLE input, either use a decimal, numeric, or a no encryption data element.SELECT pty_unprotect_string(CAST(<column_with_protected_double_data> AS STRING), "de_decimal");
SELECT pty_unprotect_string(CAST(<column_with_protected_double_data> AS STRING), "de_numeric");
- For
FLOAT input, either use a decimal, numeric, or a no encryption data element.SELECT pty_unprotect_string(CAST(<column_with_protected_float_data> AS STRING), "de_decimal");
SELECT pty_unprotect_string(CAST(<column_with_protected_float_data> AS STRING), "de_numeric");
Signature:
pty_unprotect_string (input STRING, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in STRING format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the STRING format data. |
Returns:
The UDF returns the STRING format data, which is unprotected.
Example:
SELECT pty_unprotect_string(<column_with_protected_string_data>, "de_alphanum");
pty_encrypt_string()
The UDF encrypts STRING format data, which is provided as input.
Signature:
pty_encrypt_string (input STRING, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains data in STRING format, which needs to be encrypted. |
data_element | Specifies the data element used to encrypt the STRING format data. |
Returns:
The UDF returns the BINARY format data, which is encrypted.
Example:
SELECT pty_encrypt_string(<column_with_string_data>, "<encryption_data_element>");
pty_decrypt_string()
The UDF decrypts the encrypted BINARY data, which is provided as an input.
Signature:
pty_decrypt_string (input BINARY, data_element STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains the data in the BINARY format, which needs to be decrypted. |
data_element | Specifies the data element used to decrypt the BINARY format data. |
Returns:
The UDF returns the STRING format data, which is decrypted.
Example:
SELECT pty_decrypt_string(<column_with_encrypted_string_data>, "<encryption_data_element>");
pty_protect_string_fpe()
The UDF protects the STRING format data, which is provided as input.
Note: The UDF is compatible only with the Application Protector REST approach.
Signature:
pty_protect_string_fpe (input STRING, data_element STRING, encoding STRING)
Note: The UDF accepts a maximum input length of 4081 characters.
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains the data in the STRING format, which needs to be protected. |
data_element | Specifies the data element used to protect the STRING format data. |
encoding | Specifies the encoding to be used for data protection. |
Returns:
The UDF returns the STRING format data, which is protected.
Example:
SELECT pty_protect_string_fpe(<column_with_string_data>, "de_alphanum", "utf_8");
Note: For more information about the supported encoding formats, refer to Standard Encodings
pty_unprotect_string_fpe()
The UDF unprotects the protected STRING format data, which is provided as input.
Note: The UDF is compatible only with the Application Protector REST approach.
Signature:
pty_unprotect_string_fpe (input STRING, data_element STRING, encoding STRING)
Parameters:
| Name | Description |
|---|
input | Specifies the column that contains the data in the STRING format, which needs to be unprotected. |
data_element | Specifies the data element used to unprotect the STRING format data. |
encoding | Specifies the encoding to be used for data protection. |
Returns:
The UDF returns the STRING format data, which is unprotected.
Example:
SELECT pty_unprotect_string_fpe(<column_with_protected_string_data>, "de_alphanum", "utf_8");
Note: For more information about the supported encoding formats, refer Standard Encodings