<?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 Connecting to Google BigQuery Using OAuth Authentication in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Connecting-to-Google-BigQuery-Using-OAuth-Authentication/m-p/952288#M42803</link>
    <description>&lt;P&gt;&amp;nbsp;We are following the process below to create a service account token for connecting to GCP Big query.&lt;/P&gt;
&lt;P&gt;Created an Azure client id and client secret.&lt;BR /&gt;Generated an Azure Access Token using ClientID, client secret, and GCP project number. &lt;BR /&gt;Created a Workload Identity Token using GCP project number and Azure Token. &lt;BR /&gt;Generated a Service Account Token using service account name and workload identity token.&lt;/P&gt;
&lt;P&gt;We have updated the SAS code to connect to GCP Big query using GCP project ID and Service Account Token as a refresh token, and the project Id as the Client ID.&lt;/P&gt;
&lt;P&gt;We are unsure about the correct value to use for the client secret. Could you please guide us on how to establish a connection using the Service Account Token generated from the WIF process.&lt;/P&gt;
&lt;P&gt;%let WIF_TOKEN = %sysget(WIF_TOKEN);&lt;/P&gt;
&lt;P&gt;options sastrace='d,d,d,dsa' sastraceloc=saslog nostsuffix;&lt;BR /&gt;proc sql;&lt;BR /&gt;connect to bigquery as dbcon&lt;BR /&gt;(project='xxxxxxxxx' &lt;BR /&gt;schema='xxxxx' &lt;BR /&gt;Readbuff=xxxxx&lt;BR /&gt;Scanstringcolumns=YES&lt;BR /&gt;auth_token=''&lt;BR /&gt;);&lt;BR /&gt;create table sde_model (compress=yes) as&lt;BR /&gt;select * from connection to dbcon&lt;BR /&gt;(SELECT&lt;BR /&gt;vehicle_master_pii.vin,&lt;BR /&gt;vehicle_master_pii.model ,&lt;BR /&gt;vehicle_master_pii.model_year ,&lt;BR /&gt;upper(vehicle_master_pii,nameplate)&lt;BR /&gt;FROM&lt;BR /&gt;`prj-dfdm-10-cdm-p-0010.bq_cdm_core_fdp_dmc_vw.vfc_vehicle_master_vw` as vehicle_master_pii LIMIT 10;&lt;BR /&gt;);&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;options sastrace=none;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 12:52:33 GMT</pubDate>
    <dc:creator>animesh123</dc:creator>
    <dc:date>2024-12-02T12:52:33Z</dc:date>
    <item>
      <title>Connecting to Google BigQuery Using OAuth Authentication</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Connecting-to-Google-BigQuery-Using-OAuth-Authentication/m-p/952288#M42803</link>
      <description>&lt;P&gt;&amp;nbsp;We are following the process below to create a service account token for connecting to GCP Big query.&lt;/P&gt;
&lt;P&gt;Created an Azure client id and client secret.&lt;BR /&gt;Generated an Azure Access Token using ClientID, client secret, and GCP project number. &lt;BR /&gt;Created a Workload Identity Token using GCP project number and Azure Token. &lt;BR /&gt;Generated a Service Account Token using service account name and workload identity token.&lt;/P&gt;
&lt;P&gt;We have updated the SAS code to connect to GCP Big query using GCP project ID and Service Account Token as a refresh token, and the project Id as the Client ID.&lt;/P&gt;
&lt;P&gt;We are unsure about the correct value to use for the client secret. Could you please guide us on how to establish a connection using the Service Account Token generated from the WIF process.&lt;/P&gt;
&lt;P&gt;%let WIF_TOKEN = %sysget(WIF_TOKEN);&lt;/P&gt;
&lt;P&gt;options sastrace='d,d,d,dsa' sastraceloc=saslog nostsuffix;&lt;BR /&gt;proc sql;&lt;BR /&gt;connect to bigquery as dbcon&lt;BR /&gt;(project='xxxxxxxxx' &lt;BR /&gt;schema='xxxxx' &lt;BR /&gt;Readbuff=xxxxx&lt;BR /&gt;Scanstringcolumns=YES&lt;BR /&gt;auth_token=''&lt;BR /&gt;);&lt;BR /&gt;create table sde_model (compress=yes) as&lt;BR /&gt;select * from connection to dbcon&lt;BR /&gt;(SELECT&lt;BR /&gt;vehicle_master_pii.vin,&lt;BR /&gt;vehicle_master_pii.model ,&lt;BR /&gt;vehicle_master_pii.model_year ,&lt;BR /&gt;upper(vehicle_master_pii,nameplate)&lt;BR /&gt;FROM&lt;BR /&gt;`prj-dfdm-10-cdm-p-0010.bq_cdm_core_fdp_dmc_vw.vfc_vehicle_master_vw` as vehicle_master_pii LIMIT 10;&lt;BR /&gt;);&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;options sastrace=none;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 12:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Connecting-to-Google-BigQuery-Using-OAuth-Authentication/m-p/952288#M42803</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2024-12-02T12:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Google BigQuery Using OAuth Authentication</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Connecting-to-Google-BigQuery-Using-OAuth-Authentication/m-p/952547#M42810</link>
      <description>&lt;P&gt;Here's a resource you may find handy:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/A-new-Cloudy-SAS-ACCESS-engine-Google-BigQuery/ta-p/594432" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/A-new-Cloudy-SAS-ACCESS-engine-Google-BigQuery/ta-p/594432&lt;/A&gt;&amp;nbsp;Let us know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 17:52:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Connecting-to-Google-BigQuery-Using-OAuth-Authentication/m-p/952547#M42810</guid>
      <dc:creator>SAS_Cares</dc:creator>
      <dc:date>2024-12-04T17:52:23Z</dc:date>
    </item>
  </channel>
</rss>

