BookmarkSubscribeRSS Feed
animesh123
Obsidian | Level 7

 We are following the process below to create a service account token for connecting to GCP Big query.

Created an Azure client id and client secret.
Generated an Azure Access Token using ClientID, client secret, and GCP project number.
Created a Workload Identity Token using GCP project number and Azure Token.
Generated a Service Account Token using service account name and workload identity token.

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.

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.

%let WIF_TOKEN = %sysget(WIF_TOKEN);

options sastrace='d,d,d,dsa' sastraceloc=saslog nostsuffix;
proc sql;
connect to bigquery as dbcon
(project='xxxxxxxxx'
schema='xxxxx'
Readbuff=xxxxx
Scanstringcolumns=YES
auth_token=''
);
create table sde_model (compress=yes) as
select * from connection to dbcon
(SELECT
vehicle_master_pii.vin,
vehicle_master_pii.model ,
vehicle_master_pii.model_year ,
upper(vehicle_master_pii,nameplate)
FROM
`prj-dfdm-10-cdm-p-0010.bq_cdm_core_fdp_dmc_vw.vfc_vehicle_master_vw` as vehicle_master_pii LIMIT 10;
);
quit;

options sastrace=none;

1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 893 views
  • 0 likes
  • 2 in conversation