<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Trino User Defined Functions and Procedures on</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/</link><description>Recent content in Trino User Defined Functions and Procedures on</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/index.xml" rel="self" type="application/rss+xml"/><item><title>General UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_gen_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_gen_udfs/</guid><description>&lt;p>This section includes list of general UDFs that can be used to retrieve the Trino Protector version and the current user.&lt;/p>
&lt;h2 id="ptywhoami">ptyWhoAmI()&lt;/h2>
&lt;p>This function returns the name of the user.&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>ptyWhoAmI()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>
None&lt;/p>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the name of the user logged in to the database as &lt;code>VARCHAR&lt;/code>.&lt;/p>
&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>SELECT ptyWhoAmI();
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="ptygetversion">ptyGetVersion()&lt;/h2>
&lt;p>This UDF returns the &lt;code>JpepLite&lt;/code> version used in Trino UDFs.&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>
None&lt;/p>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the &lt;code>JpepLite&lt;/code> version used in Trino UDFs.&lt;/p></description></item><item><title>VarChar UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varchar_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varchar_udfs/</guid><description>&lt;p>This section provides a list of Varchar UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;p>Consider a Trino session where you impersonate a user using the &amp;ndash;user parameter as shown in the following example.&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>./TrinoCLI --server localhost:8080 --catalog hive --schema default --user=&amp;lt;sample_user&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you execute any UDF after impersonating a user, then the query execution happens for the impersonated user &lt;code>&amp;lt;sample_user&amp;gt;&lt;/code>. This is a limitation of Trino.&lt;/p>
&lt;h2 id="ptyprotectstr">ptyProtectStr()&lt;/h2>
&lt;p>This UDF protects the &lt;code>varchar&lt;/code> values.&lt;/p></description></item><item><title>BigInt UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_bigint_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_bigint_udfs/</guid><description>&lt;p>This section provides a list of the BigInt UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;h2 id="ptyprotectbigint">ptyProtectBigInt()&lt;/h2>
&lt;p>This UDF protects the &lt;code>BigInt&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectBigInt&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">bigint&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>BigInt&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to protect the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the protected &lt;code>BigInt&lt;/code> value.&lt;/p>
&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>select PtyProtectBigInt(1234567, &amp;#39;BigInt_DE&amp;#39;);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Supported Protection Methods:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Function Name&lt;/th>
 &lt;th>Tokenization&lt;/th>
 &lt;th>Encryption&lt;/th>
 &lt;th>FPE&lt;/th>
 &lt;th>No Encryption&lt;/th>
 &lt;th>Masking&lt;/th>
 &lt;th>Monitoring&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>ptyProtectBigInt()&lt;/td>
 &lt;td>Integer - 8 bytes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="ptyunprotectbigint">ptyUnprotectBigInt()&lt;/h2>
&lt;p>This UDF unprotects the protected &lt;code>BigInt&lt;/code> value.&lt;/p></description></item><item><title>SmallInt UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_smallint_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_smallint_udfs/</guid><description>&lt;p>This section provides a list of the &lt;code>SmallInt&lt;/code> UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;h2 id="ptyprotectsmallint">ptyProtectSmallInt()&lt;/h2>
&lt;p>This UDF protects the &lt;code>SmallInt&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectSmallInt&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">smallint&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>SmallInt&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to protect the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the protected &lt;code>SmallInt&lt;/code> value.&lt;/p>
&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>select ptyProtectSmallInt(cast(12 as smallint), &amp;#39;SmallInt_DE&amp;#39;);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Supported Protection Methods:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Function Name&lt;/th>
 &lt;th>Tokenization&lt;/th>
 &lt;th>Encryption&lt;/th>
 &lt;th>FPE&lt;/th>
 &lt;th>No Encryption&lt;/th>
 &lt;th>Masking&lt;/th>
 &lt;th>Monitoring&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>ptyProtectSmallInt()&lt;/td>
 &lt;td>Integer - 2 bytes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="ptyunprotectsmallint">ptyUnprotectSmallInt()&lt;/h2>
&lt;p>This UDF unprotects the protected &lt;code>SmallInt&lt;/code> value.&lt;/p></description></item><item><title>Integer UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_int_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_int_udfs/</guid><description>&lt;p>This section provides a list of the integer UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;h2 id="ptyprotectint">ptyProtectInt()&lt;/h2>
&lt;p>This UDF protects the &lt;code>Int&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectInt&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">Int&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>Int&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to protect the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the protected &lt;code>Int&lt;/code> value.&lt;/p>
&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>select ptyProtectInt(1234567, &amp;#39;Int_DE&amp;#39;);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Supported Protection Methods:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Function Name&lt;/th>
 &lt;th>Tokenization&lt;/th>
 &lt;th>Encryption&lt;/th>
 &lt;th>FPE&lt;/th>
 &lt;th>No Encryption&lt;/th>
 &lt;th>Masking&lt;/th>
 &lt;th>Monitoring&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>ptyProtectInt()&lt;/td>
 &lt;td>Integer - 4 bytes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;td>No&lt;/td>
 &lt;td>Yes&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="ptyunprotectint">ptyUnprotectInt()&lt;/h2>
&lt;p>This UDF unprotects the protected &lt;code>Int&lt;/code> value.&lt;/p></description></item><item><title>Date UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_date_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_date_udfs/</guid><description>&lt;p>This section provides a list of the Date UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Caution:&lt;/strong> There are inconsistencies observed when Trino is used to fetch and store date values from HDFS, where data was stored using Hive. It is recommended to verify if the correct date and datetime values are retrieved when the data is fetched from or stored in HDFS without using the Trino UDFs. If the data consistency is maintained, only then proceed to the Trino Date or DateTime UDFs.&lt;/p></description></item><item><title>DateTime UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_datetime_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_datetime_udfs/</guid><description>&lt;p>This section provides a list of DateTime UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Caution:&lt;/strong> There are inconsistencies observed when Trino is used to fetch and store date values from HDFS, where data was stored using Hive. It is recommended to verify if the correct date and datetime values are retrieved when the data is fetched from or stored in HDFS without using the Trino UDFs. If the data consistency is maintained, only then proceed to the Trino Date or DateTime UDFs.&lt;/p></description></item><item><title>VarChar Encryption UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varchar_enc_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varchar_enc_udfs/</guid><description>&lt;p>This section provides a list of VarChar encryption UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;h2 id="ptystringenc">ptyStringEnc()&lt;/h2>
&lt;p>This UDF encrypts the &lt;code>Varchar&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyStringEnc&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">DataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the data to encrypt.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to encrypt the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>&lt;strong>Warning:&lt;/strong>&lt;br>&lt;/p>&lt;/blockquote>
&lt;ul>
&lt;li>The string encryption UDFs are limited to accept 2 GB data size at maximum as input.&lt;/li>
&lt;li>Ensure that the field size for the protected binary data post the required encoding does not exceed the 2 GB input limit.&lt;/li>
&lt;li>The field size to store the input data is dependent on the encryption algorithm selected, such as, AES-128, AES-256, 3DES, and CUSP, and the encoding type selected, such as, No Encoding, Base64, and Hex.&lt;/li>
&lt;li>Ensure to set the input data size based on the required encryption algorithm and encoding so that the it does not exceed the 2 GB input limit.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the encrypted &lt;code>Varbinary&lt;/code> value.&lt;/p></description></item><item><title>Unicode UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_unicode_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_unicode_udfs/</guid><description>&lt;p>This section provides a list of Unicode UDFs for the protect, unprotect, and reprotect operations. This UDF should be used only to tokenize the Unicode data in Trino, migrate the tokenized data from Trino to a Teradata database, and detokenize the data using the Protegrity Database Protector. Ensure to use this UDF with a Unicode tokenization data element only.&lt;/p>
&lt;h2 id="ptyprotectunicode">ptyProtectUnicode()&lt;/h2>
&lt;p>This UDF protects the &lt;code>Varchar&lt;/code> (Unicode) values.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectUnicode&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&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>Decimal UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_decimal_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_decimal_udfs/</guid><description>&lt;p>This section provides a list of the Decimal UDFs for the protect, unprotect, and reprotect operations. Ensure to use the data element with the &lt;code>No Encryption&lt;/code> method only. Using any other data element might cause data corruption.&lt;/p>
&lt;h2 id="ptyprotectdecimal">ptyProtectDecimal()&lt;/h2>
&lt;p>This UDF protects the &lt;code>Decimal&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectDecimal&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">decimal&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>Decimal&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to protect the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the protected &lt;code>Decimal&lt;/code> value. If the input value is &lt;code>NULL&lt;/code> and the data element is not a part of the policy, then the output value returned is &lt;code>NULL&lt;/code>.&lt;/p></description></item><item><title>Double UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_double_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_double_udfs/</guid><description>&lt;p>This section provides a list of &lt;code>Double&lt;/code> UDFs for the protect, unprotect, and reprotect operations.&lt;/p>
&lt;h2 id="ptyprotectdouble">ptyProtectDouble()&lt;/h2>
&lt;p>This UDF protects the &lt;code>Double&lt;/code> value.&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-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ptyProtectDouble&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">double&lt;/span> &lt;span style="color:#000">input&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">varchar&lt;/span> &lt;span style="color:#000">dataElement&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>Double&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to protect the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>Note: It is an observed behavior with Trino that the UDF accepting double parameter also accepts decimal and integer parameter due to internal data type conversion.&lt;/p></description></item><item><title>VarBinary Encryption UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varbin_enc_udfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/datawarehouse_protector/dwp_udfs/dwp_trino_udfs/dwp_trino_varbin_enc_udfs/</guid><description>&lt;h2 id="ptybinaryenc">ptyBinaryEnc()&lt;/h2>
&lt;p>This UDF protects the VarBinary values. If the varbinary data size exceeds 32 MB, then set the configuration in the &lt;code>config.properties&lt;/code> file and then restart the Trino server on all the nodes (co-ordinator and worker).&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>node-manager.http-client.max-content-length=64MB
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>exchange.http-client.max-content-length=64MB
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&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>ptyBinaryEnc(VarBinary input, Varchar DataElement)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong>&lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Name&lt;/th>
 &lt;th>Type&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>input&lt;/code>&lt;/td>
 &lt;td>VarBinary&lt;/td>
 &lt;td>Specifies the data to encrypt.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dataElement&lt;/code>&lt;/td>
 &lt;td>VarChar&lt;/td>
 &lt;td>Specifies the name of the data element to encrypt the data.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong>&lt;br>
This UDF returns the encrypted &lt;code>Varbinary&lt;/code> value.&lt;/p></description></item></channel></rss>