Question

I'm wondering if it is possible to pull from more that one database in the same source qualifier. You can only specify a single database connection per Source Qualifier so I'm not sure if this is possible.

Was it helpful?

Solution

Ben,

If they are both from the same database vendor and db links are set up, you can use DBLINKS in the source qualifier.

select a.col1,
       b.col2
  from schema1.table1 a,
       schema1.table2@db2 b
  where a.col3 = b.col4;

But if they are heterogeneous databases, I think the best way to implement would be create two different source qualifiers (or different look ups based on your requirement and the number of columns) and use the parameter file / session to mention different connections.

OTHER TIPS

Assuming that the account used to connect has equivalent rights in both databases it's DATABASE_NAME.TABLE_NAME

SELECT
    a.id 
   ,a.name
   ,a.company
   ,b.company_id 
   ,b.company_name
   ,b.address 
FROM
  database1.users as a 
JOIN 
  database2.companies as b ON a.company=b.company_id

I would implement this using database links, which allows interactions across two databases. Although not a preferred solution for many reasons, this would help you achieve what you said, for your reasons.

However, from an ideal solution perspective, you should not be doing this in first place :) If the data is flowing through from two different databases, get them from two different source qualifiers and then depending upon your need, go for a joiner or lookup (depends upon the functional requirements) etc..

If the login have at least read access and the schemas are at the same service is possible.

For a reason our DBA don't allow dblinks...

One reason to use informatica is that you can create a specific Source Qualifier (SQ) for different sources and then use a Join/Union trans... Believe me if you have issues in some of the data sources; fix it and troubleshooting would be easier.

Also imagine that you leave the company and other team takes that jobs; graphically and logically would be easier to maintain...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top