BookmarkSubscribeRSS Feed
BrettRankin
Calcite | Level 5

Hi Everyone,

 

I wanted to know if we can connect to multiple databases using one odbc connection in the DataFlux tool.

This question was posed to me from an analyst who wants to query a parallel datawarehouse that uses tables from 2 different databases that are on the same server.   In his query, he would ndicate the database, schema, and tables in his 'From" statement...I believe he can do this easily in SAS but not sure if its the same in DataFlux.   Most times, we ask our analysts to indicate the database when setting up the ODBC connection in DataFlux...that is why I am asking.

 

Thanks for any help.

Brett

 

Select a.*

from database1.schema1.table1 a inner join

        database2.schema2.table2 b

on a.field1 = b.field1

1 REPLY 1
SASKiwi
PROC Star

I don't have a working Dataflux environment to check this out but one option you could consider is creating a table view in SAS based on a single ODBC SQL passthru query using multiple databases.

 

Dataflux can happily read SAS tables so I see no reason it could not read a SAS view.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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