Reputation: 405
So I continue to rewrite my lovely SSIS packages to ADF Data Flows. However, there is a lot of cases where I have some OLE DB Source with quite complicated SQL statement followed by other transformations.
Let's say there is a SQL statement which joins 10 different tables. As far as I know I can execute SQL statement only on my sink. So to get the very same dataset that is being used later, I have to create 10 different sources and 10 join operations. Is that correct?
It is possible but it doesn't seem to be very efficient. The only other thing that comes to my mind is to re-think our whole DWH logic but it would be a lot of added work, so I would rather avoid that.
Thank you in advance!
Upvotes: 2
Views: 2660
Reputation: 16401
Actually, it's possible to execute SQL query on Source(only can do sql query).
For example, I do a SQL query in Source Azure SQL database.
Here's the data in my table test4
and test6
:
Don't specify the table in Source dataset:
Data Flow Source setting:
Source Options, execute a SQL query joined two tables:
select a.id, a.tname,b.tt from test6 as a left join test4 as b on a.id=b.id
Import the schema of the query result:
Hope this helps.
Upvotes: 4