<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question PIG UDFs Python - Gurantee that String have the format 'yyyy-MM-dd hh:ss:mm' in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PIG-UDFs-Python-Gurantee-that-String-have-the-format-yyyy-MM/m-p/160589#M36634</link>
    <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I've the following part of script in Apache Pig:&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;STRONG&gt; = foreach Source_Data generate  
                     (int) ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;                    ToString( ToDate((long) Time), 'yyyy-MM-dd hh:ss:mm') as date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;                   (int) Code;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Store A into '.../newfile';&lt;/STRONG&gt;
...&lt;/P&gt;&lt;P&gt;Now I want to create a new Script using Python UDF to guarantee that in my newfile on column Date (#1) I only have String in the format 'yyyy-MM-dd hh:ss:mm'.&lt;/P&gt;&lt;P&gt;Is possible to do that?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:32:43 GMT</pubDate>
    <dc:creator>m2014227</dc:creator>
    <dc:date>2022-09-16T10:32:43Z</dc:date>
    <item>
      <title>PIG UDFs Python - Gurantee that String have the format 'yyyy-MM-dd hh:ss:mm'</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PIG-UDFs-Python-Gurantee-that-String-have-the-format-yyyy-MM/m-p/160589#M36634</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I've the following part of script in Apache Pig:&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;STRONG&gt; = foreach Source_Data generate  
                     (int) ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;                    ToString( ToDate((long) Time), 'yyyy-MM-dd hh:ss:mm') as date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;                   (int) Code;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Store A into '.../newfile';&lt;/STRONG&gt;
...&lt;/P&gt;&lt;P&gt;Now I want to create a new Script using Python UDF to guarantee that in my newfile on column Date (#1) I only have String in the format 'yyyy-MM-dd hh:ss:mm'.&lt;/P&gt;&lt;P&gt;Is possible to do that?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:32:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PIG-UDFs-Python-Gurantee-that-String-have-the-format-yyyy-MM/m-p/160589#M36634</guid>
      <dc:creator>m2014227</dc:creator>
      <dc:date>2022-09-16T10:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: PIG UDFs Python - Gurantee that String have the format 'yyyy-MM-dd hh:ss:mm'</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PIG-UDFs-Python-Gurantee-that-String-have-the-format-yyyy-MM/m-p/160590#M36635</link>
      <description>&lt;P&gt;you can write a new script using regex to test this column and throw away bad fields or do it all in one step where you pass the date field to UDF and check for formatting&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:28:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PIG-UDFs-Python-Gurantee-that-String-have-the-format-yyyy-MM/m-p/160590#M36635</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-04T01:28:06Z</dc:date>
    </item>
  </channel>
</rss>

