How should set up SAS desktop to access GBQ? I am able to access it via Python pass-through using a project ID. How do I set up access via SAS? Thank you.
You need a SAS/ACCESS product installed and licensed, like SAS/ACCESS to Google Big Query or SAS/ACCESS to ODBC. Run this code to confirm what products you have available:
proc product_status;
run;
proc setinit;
run;
Yes, here is what I have:
I don't see Big Query listed but SAS/ACCESS Interface to ODBC should work. You will need to obtain an ODBC driver for Big Query and install it on your PC. Do you have a help desk who can advise on this?
Just Google it. I did and found this: https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers
What bitness is your SAS? If 64-bit then download the 64-bit ODBC driver for Windows and install it. If 32-bit use the 32-bit ODBC driver for Windows.
Once installed it should show in the ODBC Administrator tool:
Probably the easiest way to try this out is to create a GBQ DSN in the ODBC Administrator similar to this:
There's a Test Connection button in the tool to check your connection details. Try that and if it works, the next step is to try connecting in SAS. Let's say you created a DSN (Data Source Name) called GBQ. Now try this in SAS:
libname MyGBQ ODBC DSN = GBQ;
Check your SAS log to see if it connected OK or not. Note you will have to save your user name and password in the DSN for this to work. Alternatively you will need to add those to your LIBNAME.
Looks like I have it - right?
So how should I test it in SAS?
Try a LIBNAME as already mentioned, with the DSN you have created.
libname MyGBQ ODBC DSN = 'Google BigQuery';
Check the SAS log to see if it works or not. There are most likely other options that need to be added to the LIBNAME, but one step at a time.
Here is the error I get:
Looks like some configuration for the Simba ODBC driver is missing. Have a look at the documentation: https://docs.posit.co/drivers/1.6/pdf/Simba ODBC Driver for Google BigQuery Install and Configuratio...
Did you add any login details to your DSN like this?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: