<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>User Defined Functions and APIs on</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/</link><description>Recent content in User Defined Functions and APIs on</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/index.xml" rel="self" type="application/rss+xml"/><item><title>MapReduce APIs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_mapreduce_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_mapreduce_udfs/</guid><description>&lt;p>This section describes the MapReduce APIs available for protection and unprotection in the Big Data Protector to build secure Big Data applications.&lt;/p>
&lt;p>&lt;strong>Warning:&lt;/strong> The Protegrity MapReduce protector only supports &lt;code>bytes&lt;/code> converted from the &lt;code>string&lt;/code> data type.&lt;/p>
&lt;p>If any other data type is directly converted to &lt;code>bytes&lt;/code> and passed as input to the API that supports &lt;code>byte&lt;/code> as input and provides &lt;code>byte&lt;/code> as output, then data corruption might occur.&lt;/p>
&lt;p>&lt;strong>Caution:&lt;/strong> If you are using the Protect, or Unprotect, or Reprotect API which accepts byte as input and provides byte as output, then ensure that you pass the charset argument in APIs with the charset used to encode the string input data type. &lt;br> For example, if the input String was encoded using the UTF-16LE charset, then ensure to pass the &amp;ldquo;UTF-16LE&amp;rdquo; charset argument in the ByteIn or ByteOut APIs.&lt;/p></description></item><item><title>Hive UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_hive_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_hive_udfs/</guid><description>&lt;p>&lt;strong>Warning:&lt;/strong> If you are using Ranger or Sentry, then ensure that your policy provides &lt;strong>create&lt;/strong> access permissions to the required UDFs.&lt;/p>
&lt;p>This section lists the Hive UDFs available for protection and unprotection in the Big Data Protector.&lt;/p>
&lt;h2 id="ptygetversion">ptyGetVersion()&lt;/h2>
&lt;p>This UDF returns the current version of the protector.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>ptyGetVersion()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>None&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Result:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>The UDF returns the current version of the protector.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Example:&lt;/strong>&lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>create temporary function ptyGetVersion AS &amp;#39;com.protegrity.hive.udf.ptyGetVersion&amp;#39;;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>select ptyGetVersion();
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="ptygetversionextended">ptyGetVersionExtended()&lt;/h2>
&lt;p>This UDF returns the extended version information of the protector.&lt;/p></description></item><item><title>Pig UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_pig_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_pig_udfs/</guid><description>&lt;h2 id="ptygetversion">ptyGetVersion()&lt;/h2>
&lt;p>The function returns the current version of the protector.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong>&lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>ptyGetVersion()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>None&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Result:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>The function returns the version number in a chararray.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Example:&lt;/strong>&lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">REGISTER&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">&amp;lt;/&lt;/span>&lt;span style="color:#000">path&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#000">to&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#000">bdp&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#000">lib&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&amp;gt;/&lt;/span>&lt;span style="color:#000">peppig&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">-&amp;lt;&lt;/span>&lt;span style="color:#000">jar_version&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">&amp;gt;.&lt;/span>&lt;span style="color:#000">jar&lt;/span>&lt;span style="color:#000;font-weight:bold">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">//&lt;/span> &lt;span style="color:#000">register&lt;/span> &lt;span style="color:#000">pep&lt;/span> &lt;span style="color:#000">pig&lt;/span> &lt;span style="color:#000">version&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">DEFINE&lt;/span> &lt;span style="color:#000">ptyGetVersion&lt;/span> &lt;span style="color:#000">com&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">protegrity&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">pig&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">udf&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">ptyGetVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">//&lt;/span>&lt;span style="color:#000">define&lt;/span> &lt;span style="color:#000">UDF&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">employees&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#000">LOAD&lt;/span> &lt;span style="color:#a40000">‘&lt;/span>&lt;span style="color:#000">employee&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">csv&lt;/span>&lt;span style="color:#a40000">’&lt;/span> &lt;span style="color:#000">using&lt;/span> &lt;span style="color:#000">PigStorage&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#a40000">‘&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>&lt;span style="color:#a40000">’&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span> &lt;span style="color:#000">AS&lt;/span> &lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">eid&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#000">chararray&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>&lt;span style="color:#000">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#000">chararray&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">ssn&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#000">chararray&lt;/span>&lt;span style="color:#000;font-weight:bold">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">//&lt;/span> &lt;span style="color:#204a87">load&lt;/span> &lt;span style="color:#000">employee&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#000">csv&lt;/span> &lt;span style="color:#000">from&lt;/span> &lt;span style="color:#000">HDFS&lt;/span> &lt;span style="color:#000">path&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">version&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#000">FOREACH&lt;/span> &lt;span style="color:#000">employees&lt;/span> &lt;span style="color:#000">GENERATE&lt;/span> &lt;span style="color:#000">ptyGetVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">DUMP&lt;/span> &lt;span style="color:#000">version&lt;/span>&lt;span style="color:#000;font-weight:bold">;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="ptygetversionextended">ptyGetVersionExtended()&lt;/h2>
&lt;p>The function returns the extended version information of the protector.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong>&lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>ptyGetVersionExtended()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>None&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Result:&lt;/strong>&lt;br>&lt;/p>
&lt;ul>
&lt;li>The function returns a chararray in the following format:
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>BDP: &amp;lt;1&amp;gt;; JcoreLite: &amp;lt;2&amp;gt;; CORE: &amp;lt;3&amp;gt;;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>where,
&lt;ul>
&lt;li>
&lt;ol>
&lt;li>is the current version of the Protector&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>
&lt;ol start="2">
&lt;li>is the Jcorelite library version&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>
&lt;ol start="3">
&lt;li>is the Core library version&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Example:&lt;/strong>&lt;br>&lt;/p></description></item><item><title>HBase Commands</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_hbase_cmd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_hbase_cmd/</guid><description>&lt;p>HBase is a database, which provides random read and write access to tables, consisting of rows and columns, in real-time. HBase is designed to run on commodity servers, to automatically scale as more servers are added, and is fault tolerant as data is divided across servers in the cluster. HBase tables are partitioned into multiple regions. Each region stores a range of rows in the table. Regions contain a datastore in memory and a persistent datastore (HFile). The Name node assigns multiple regions to a region server. The Name node manages the cluster and the region servers store portions of the HBase tables and perform the work on the data.&lt;/p></description></item><item><title>Impala UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_impala_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_impala_udfs/</guid><description>&lt;p>This section explains the Impala protector, the UDFs provided, and the commands for protecting and unprotecting data in an Impala table.&lt;/p>
&lt;h2 id="overview-of-the-impala-protector">Overview of the Impala Protector&lt;/h2>
&lt;p>Impala is an MPP SQL query engine for querying the data stored in a cluster. The Protegrity Impala protector extends the functionality of the Impala query engine and provides UDFs which protect or unprotect the data as it is stored or retrieved.&lt;/p>
&lt;h2 id="impala-protector-usage">Impala Protector Usage&lt;/h2>
&lt;p>The Protegrity Impala protector provides UDFs for protecting data using encryption or tokenization, and unprotecting data by using decryption or detokenization.&lt;/p></description></item><item><title>Spark Java APIs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_spark_java_apis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_spark_java_apis/</guid><description>&lt;p>All the Spark Java APIs that are available for protection and unprotection in Big Data Protector to build secure Big Data applications are listed here.&lt;/p>
&lt;p>Spark is an execution engine that carries out batch processing of jobs in-memory and handles a wider range of computational workloads. In addition to processing a batch of stored data, Spark is capable of manipulating data in real time.&lt;/p>
&lt;p>Spark leverages the physical memory of the Hadoop system. It utilizes the Resilient Distributed Datasets (RDDs) to store the data in-memory and lowers latency, if the data fits in the memory size. The data is saved on the hard drive only if required. RDDs being the basic units of abstraction and computation in Spark, you can use the Spark protection and unprotection APIs to perform transformation operations on an RDD.&lt;/p></description></item><item><title>Spark SQL UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_spark_sql_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_spark_sql_udfs/</guid><description>&lt;p>All the Spark SQL UDFs that are available for protection and unprotection in Big Data Protector to build secure Big Data applications are listed here.&lt;/p>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>The Spark SQL module provides relational data processing capabilities to Spark. The module allows you to run SQL queries with Spark programs. It contains DataFrames, which is an RDD with an associated schema, that provide support for processing structured data in Hive tables.&lt;/p>
&lt;p>Spark SQL enables structured data processing and programming of RDDs providing relational and procedural processing through a DataFrame API that integrates with Spark.&lt;/p></description></item><item><title>PySpark - Scala Wrapper UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_pyspark_scala_wrapper_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_pyspark_scala_wrapper_udfs/</guid><description>&lt;p>All the Spark Scala Wrapper UDFs that are available for protection and unprotection in Big Data Protector to build secure Big Data applications are listed here.&lt;/p>
&lt;p>For each of the Spark SQL UDF in &lt;a href="https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_spark_sql_udfs/">Spark SQL UDFs&lt;/a>, a Scala UDF wrapper class is created so that it can be registered in the PySpark and invoked using the &lt;code>spark.sql()&lt;/code> method.&lt;/p>
&lt;h2 id="ptygetversionscalawrapper">ptyGetVersionScalaWrapper()&lt;/h2>
&lt;p>The UDF returns the current version of the protector.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong>&lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>ptyGetVersionScalaWrapper()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p></description></item><item><title>Unity Catalog Batch Python UDFs</title><link>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_uc_batch_python_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.1/docs/bdp/bdp_user_defined_functions/bdp_uc_batch_python_udfs/</guid><description>&lt;p>The UDFs in this section is applicable only to install and configure the Big Data Protector using the Standard Compute in Databricks. The information presented in this section will not apply to the Dedicated Compute as well as SQL Warehouse.&lt;br>
This version of the build only supports Unity Catalog Batch Python UDFs that use the Cloud Protect APIs. The Hive and Spark UDFs and APIs that provide native protection within the cluster nodes are not packaged in this build. If you want to use those features, please use the 9.1.0.0 builds.&lt;/p></description></item></channel></rss>