<?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: How to specify formats while pulling data from Bigquery? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/746769#M234294</link>
    <description>I agree. But was just checking if there is a way. I think will have to continue with SAS data or normal SQL.</description>
    <pubDate>Wed, 09 Jun 2021 14:39:16 GMT</pubDate>
    <dc:creator>psrajput</dc:creator>
    <dc:date>2021-06-09T14:39:16Z</dc:date>
    <item>
      <title>How to specify formats while pulling data from Bigquery?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745424#M233646</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When we pull data from BQ in SAS, it somehow converts the format of some of the columns, because I think it uses bq resources to run the query. Which is affecting the data values.&lt;BR /&gt;&lt;BR /&gt;For example, one of the values in a column is 14277.4, whereas after pulling this data in SAS, it comes as 14277. I expect this is because of the format change. Actual format should be simple numeric but it is coming as dollar format. Is there a way to correct this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;connect to bigquery (project="project_name" schema="schema_name" cred_path="cred_location" bulkunload=yes bl_bucket="bucket_name" max_char_len=80);&lt;/P&gt;&lt;P&gt;create table lib.table as select * from connection to bigquery (&lt;/P&gt;&lt;P&gt;select * from schema.table;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;disconnect from bigquery;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although, the below runs fine, as it it running on SAS itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname bq bigquery project="project_name" schema="schema_name" cred_path="cred_location" bulkunload=yes bl_bucket="bucket_name" max_char_len=80;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data lib.table;&lt;/P&gt;&lt;P&gt;set src.table;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 10:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745424#M233646</guid>
      <dc:creator>psrajput</dc:creator>
      <dc:date>2021-06-03T10:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify formats while pulling data from Bigquery?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745427#M233647</link>
      <description>&lt;P&gt;This looks like a technical support issue. Have you contacted them?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 10:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745427#M233647</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-03T10:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify formats while pulling data from Bigquery?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745463#M233665</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310443"&gt;@psrajput&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;When you are using SQL pass through, the query is running in the DBMS (here BQ), so data types, formats etc. of the DBMS apply and you &lt;STRONG&gt;may possibly&lt;/STRONG&gt; need to handle conversion too.&lt;BR /&gt;Whereas when using implicit SQL / libname statement, the processing is taking in SAS and its data type, formats, precision etc. will apply..&lt;BR /&gt;That is why you are seeing the difference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745463#M233665</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-06-03T13:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify formats while pulling data from Bigquery?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745964#M233936</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/131732"&gt;@Sajid01&lt;/a&gt; SAS should be handling the data types. There is no valid reason for the behaviour reported here.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 06:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/745964#M233936</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-05T06:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify formats while pulling data from Bigquery?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/746769#M234294</link>
      <description>I agree. But was just checking if there is a way. I think will have to continue with SAS data or normal SQL.</description>
      <pubDate>Wed, 09 Jun 2021 14:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-formats-while-pulling-data-from-Bigquery/m-p/746769#M234294</guid>
      <dc:creator>psrajput</dc:creator>
      <dc:date>2021-06-09T14:39:16Z</dc:date>
    </item>
  </channel>
</rss>

