<?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: Data Ingestion SAS to Hive Data Type issues in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716275#M221337</link>
    <description>&lt;P&gt;How does it display the number when queried form sas with a 20. format?&lt;/P&gt;
&lt;P&gt;This does not look like a SAS question. Your viewer may be the culprit, see here for example&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/32576187/hive-converting-from-double-to-string-not-in-scientific" target="_blank"&gt;https://stackoverflow.com/questions/32576187/hive-converting-from-double-to-string-not-in-scientific&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 00:45:39 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-02-03T00:45:39Z</dc:date>
    <item>
      <title>Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716242#M221320</link>
      <description>&lt;P&gt;I am trying to create a hive table from SAS using the below code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you guys come across any data compatibility / data type conversion issues?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Till now I have faced the below issues, can someone please help.&lt;/P&gt;
&lt;P&gt;1. There is a NOTE saying SAS variable labels, formats, and lengths are not written to DBMS tables. This means the labels do not get stored.&lt;/P&gt;
&lt;P&gt;2. Numeric column values that are long, get saved as exponential values in Hive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIBNAME orchive HADOOP&lt;BR /&gt;uri='jdbc:hive2://xxxxxxx.systems.uk.xxxx:1111,xxxxxx.systems.uk.xxxx:1111,xxxxxxxx.systems.uk.xxxx:1111/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;principal=hive/_HOST@HRES.ADROOT.XXXX?hive.execution.engine=tez;hive.tez.container.size=16384;tez.queue.name=risk'&lt;BR /&gt;PORT=10001 &lt;BR /&gt;SERVER="xxxxxxxxx.systems.uk.xxxx,xxxxxxxxx.systems.uk.xxxx,xxxxxxxx.systems.uk.xxxx"&lt;BR /&gt;schema=prodschema&lt;BR /&gt;dbmax_text=100&lt;BR /&gt;DBCREATE_TABLE_OPTS='STORED AS ORC'&lt;BR /&gt;; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data orchive.test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set test;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 22:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716242#M221320</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2021-02-02T22:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716259#M221325</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; There is a NOTE saying SAS variable labels, formats, and lengths are not written to DBMS tables. This means the labels do not get stored.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;That's right. There's no metadata in Hive. You can add comments though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt; Numeric column values that are long, get saved as exponential values in Hive.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;That's weird. What's the data type? or do you have a short SAS format maybe?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, for speed, use proc append rather than a data step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 23:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716259#M221325</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-02T23:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716266#M221331</link>
      <description>&lt;P&gt;SAS - The account numbers in SAS are 15 digit long. As it is numeric, the length of course is 8. Format is 20. Informat is 20.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hive - (See image ). the datatype is double. But when queried through hive prompt using select statement, it shows as exponential value. See image.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 23:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716266#M221331</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2021-02-02T23:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716269#M221334</link>
      <description>&lt;P&gt;I do not open MS office documents from the web. Use the image icon.&lt;/P&gt;
&lt;P&gt;If the data type is double, I suspect the issue is simply that SAS uses the default&amp;nbsp; &lt;FONT face="courier new,courier"&gt;best&lt;/FONT&gt;.&amp;nbsp; format to display the value, and that format cannot show 15 digits.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 23:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716269#M221334</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-02T23:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716270#M221335</link>
      <description>&lt;P&gt;Oh the &lt;STRONG&gt;hive&lt;/STRONG&gt; prompt shows the exponential notation. Mmm could it be setting on your hive viewer?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 23:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716270#M221335</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-02T23:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716273#M221336</link>
      <description>&lt;P&gt;Here is the Hive prompt showing the value as exponential.&lt;/P&gt;
&lt;P&gt;Please advise if this can be fixed.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="pic.jpg" style="width: 294px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54251iA1CBA1255BEA74CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic.jpg" alt="pic.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 00:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716273#M221336</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2021-02-03T00:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716275#M221337</link>
      <description>&lt;P&gt;How does it display the number when queried form sas with a 20. format?&lt;/P&gt;
&lt;P&gt;This does not look like a SAS question. Your viewer may be the culprit, see here for example&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/32576187/hive-converting-from-double-to-string-not-in-scientific" target="_blank"&gt;https://stackoverflow.com/questions/32576187/hive-converting-from-double-to-string-not-in-scientific&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 00:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716275#M221337</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-03T00:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716349#M221372</link>
      <description>&lt;P&gt;2. How did you verify that it's stored as exponential? Try to look at the values from a Hive query, not SAS to rula out any data type conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your coulumn should be stored as DOUBLE given the default data mapping rules.&lt;/P&gt;
&lt;P&gt;If you have a display in conversion to sas, you can play with SAS properties on the Hive table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="xisDoc-codeFragment"&gt;&lt;CODE&gt;ALTER TABLE passthrough_ex SET TBLPROPERTIES ('SASFMT:bgint'='CHAR(20)')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't thik DOUBLE itself works, you can use the DBSASTYPE option to use another data type in Hive.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 09:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716349#M221372</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-02-03T09:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716361#M221377</link>
      <description>&lt;P&gt;Thanks Chris. I tried casting it as big int and it displays correctly. So I think the better way to do it would be to create an empty hive table with the structure you need, and then use PROC APPEND.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 10:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716361#M221377</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2021-02-03T10:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716376#M221386</link>
      <description>This makes perfect sense.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Feb 2021 11:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716376#M221386</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-03T11:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716379#M221389</link>
      <description>&lt;P&gt;Thanks Linush&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 11:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/716379#M221389</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2021-02-03T11:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/817377#M322646</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Numeric column values that are long, get saved as exponential values in Hive.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's&amp;nbsp; just the way the are &lt;STRONG&gt;displayed&lt;/STRONG&gt;. Use a long format to see all the digits.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 00:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/817377#M322646</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-06-10T00:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data Ingestion SAS to Hive Data Type issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/817394#M322653</link>
      <description>&lt;P&gt;Why would you store account number as anything other than a string?&amp;nbsp; What is meaning of a MEAN account number?&lt;/P&gt;
&lt;P&gt;If the values are already up to 15 digits long they will pretty soon exceed the limit of precision for storing as a floating point number.&lt;/P&gt;
&lt;PRE&gt;2333  data _null_;
2334    x=constant('exactint');
2335    put x= comma32.;
2336  run;

x=9,007,199,254,740,992
&lt;/PRE&gt;
&lt;P&gt;That means that beyond&amp;nbsp;9,007,199,254,740,992 you can no longer be certain the integer can be stored precisely.&amp;nbsp; Some numbers that are powers of 2 can be represented exactly but not the integers between them.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 02:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Ingestion-SAS-to-Hive-Data-Type-issues/m-p/817394#M322653</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-06-10T02:53:24Z</dc:date>
    </item>
  </channel>
</rss>

