<?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>topic Re: SAS Reading Hive/HADOOP ~ Variable Length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493388#M129781</link>
    <description>&lt;P&gt;Thanks Chris for the feedback..&lt;/P&gt;&lt;P&gt;To connect I use all the hadoop server=URI, Server, Schema string values....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Data LIBNAME.MyDay;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set LIBNAME.HADOOP_Data;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now I have common sensed the Length Statement after take a peek into the data...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Data LIBNAME.MyDay;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length&amp;nbsp;String5Code $5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length LongDesc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$150;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set LIBNAME.HADOOP_Data;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I have noticed is the numeric are 8. which is correct...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of other values when read in..&lt;/P&gt;&lt;P&gt;Numeric Variable = Num 8 11. 11.&lt;/P&gt;&lt;P&gt;Date Variables = Num 8 DATETIME25.6 DATETIME25.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Jay&lt;/P&gt;</description>
    <pubDate>Fri, 07 Sep 2018 12:57:13 GMT</pubDate>
    <dc:creator>JayS</dc:creator>
    <dc:date>2018-09-07T12:57:13Z</dc:date>
    <item>
      <title>SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493140#M129708</link>
      <description>&lt;P&gt;I have been able to connect my SAS EG to an instance of HADOOP / Hive (&lt;EM&gt;just figuring out all this HADOOP stuff as I go&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I read in the data, ALL the character variables are 32,767 in length, and have formats?&lt;/P&gt;&lt;P&gt;I have a routine that checks the max length and see that at MOST a length is maybe 250.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume this is a HADOOP thing not a SAS Thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have coded up a manual workaround to assign much more realistic lengths, but it's manual and not a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Questions&lt;/P&gt;&lt;P&gt;1) Did our&amp;nbsp;'HADOOP guys' just not take the time to assign lengths?&lt;/P&gt;&lt;P&gt;2) Is this standard, and everyone has to deal with it&lt;/P&gt;&lt;P&gt;2) Any nice way to handle it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA, Jay&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 18:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493140#M129708</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2018-09-06T18:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493214#M129715</link>
      <description>&lt;P&gt;How do you read the Hadoop data?&lt;/P&gt;
&lt;P&gt;Hadoop storage is very basic in terms of metadata, but normally column length is known.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 21:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493214#M129715</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-09-06T21:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493309#M129763</link>
      <description>&lt;P&gt;1) Probably yes. Hadoop "guys" in my experience doesn't care about string lenghts, perhaps enforcing some kind of "schema on read" feeling.&lt;/P&gt;
&lt;P&gt;2) Don't know, up to the site to its standard I guess.&lt;/P&gt;
&lt;P&gt;3) Define nice ;-).&lt;/P&gt;
&lt;P&gt;I can tink of two ways:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the DBMAX_TEXT libname option. Even if that is kinda blunt, but it's better to have 500 rather than 32K columns.&lt;/LI&gt;
&lt;LI&gt;ACCESS to Hadoop (Hive) honors the SASFMT attribute. If you in some way can generate a script that can generate the code based on any source schema this can quite easily be adopted by the Hadoop people. If not, this can be quite cumbersome, depending on the no of columns you wish to specify. This can be doneeither through SQL explicit pass-through from SAS (&lt;A href="https://communities.sas.com/t5/SAS-Data-Management/SAS-Access-Hadoop-String-Columns-Field-Length-Options/td-p/215164" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Management/SAS-Access-Hadoop-String-Columns-Field-Length-Options/td-p/215164&lt;/A&gt;) or directly in Hive.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 07 Sep 2018 08:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493309#M129763</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-09-07T08:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493388#M129781</link>
      <description>&lt;P&gt;Thanks Chris for the feedback..&lt;/P&gt;&lt;P&gt;To connect I use all the hadoop server=URI, Server, Schema string values....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Data LIBNAME.MyDay;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set LIBNAME.HADOOP_Data;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now I have common sensed the Length Statement after take a peek into the data...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Data LIBNAME.MyDay;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length&amp;nbsp;String5Code $5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length LongDesc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$150;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set LIBNAME.HADOOP_Data;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I have noticed is the numeric are 8. which is correct...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of other values when read in..&lt;/P&gt;&lt;P&gt;Numeric Variable = Num 8 11. 11.&lt;/P&gt;&lt;P&gt;Date Variables = Num 8 DATETIME25.6 DATETIME25.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Jay&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493388#M129781</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2018-09-07T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493397#M129786</link>
      <description>&lt;P&gt;Thanks Linus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll touch base with the HADOOP 'Guys'... Most likely this is the root cause...&lt;/P&gt;&lt;P&gt;The DBMAX_TEXT&amp;nbsp;option, good idea I'll check it out.&lt;/P&gt;&lt;P&gt;500 is better than 32k for now, with the exception of a savings account!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I have forced all values after creating a Proc Contents to look at the string values, &lt;EM&gt;See my other response on this thread&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also working on trying to figure out a way to run the MAX_Length code,&amp;nbsp;take the output data load it into a&amp;nbsp;SAS FMT and use the SAS Format Put() to&amp;nbsp;replace the traditional Length Statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll keep trying for a few more hours while I contact the HADOOP guys &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I'll post my final solution as it may help other...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493397#M129786</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2018-09-07T13:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reading Hive/HADOOP ~ Variable Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493476#M129821</link>
      <description>&lt;P&gt;&lt;FONT face="helvetica" size="1"&gt;Update:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="1"&gt;This code &lt;FONT color="#0000ff"&gt;dbmax_text&lt;/FONT&gt;=&lt;STRONG&gt;&lt;FONT color="#008080"&gt;175 &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#008080"&gt;&lt;FONT color="#000000"&gt;Update&amp;nbsp;worked fine for me.&lt;BR /&gt;For now I can live with this.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="1"&gt;&lt;FONT color="#008080"&gt;&lt;FONT color="#000000"&gt;Thanks to everyone who provided input.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica" size="1"&gt;&lt;FONT color="#008080"&gt;&lt;FONT color="#000000"&gt;J&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:01:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reading-Hive-HADOOP-Variable-Length/m-p/493476#M129821</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2018-09-07T15:01:55Z</dc:date>
    </item>
  </channel>
</rss>

