Datafactory SQL query for several Tables

Axell 66 Reputation points
2021-12-01T09:46:36.603+00:00

Hi!
I have some piplenie, the result of its work are two tables in one DB.
I also have my final SQL query (it is working in MySQL Server)
154056-4.jpg

How i can execute this SQL query into Datafactory for my two tables?
I try to use Lookup Activity but it can use only ONE table.
154057-5.jpg
I also know about DataFlow but there is no place to insert the whole SQL query (screen below)
154029-6.jpg

The question is - how i can insert my SQL Query as final block of my pipeline (screen below)?
I just do not want to do this query in SQL server, if datafactory can do it for me by itself.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,054 questions
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 37,056 Reputation points Microsoft Employee
    2021-12-02T15:28:45.9+00:00

    Hi @Axell ,

    Thank you for posting query in Microsoft Q&A Platform.

    Lookup activity will help you to execute query in SQL.

    You should consider selecting query option inside Lookup activity. When you selected Query option, table selected inside dataset will not play any role. Query will directly execute on your DB(database which is selected inside linked service of your dataset).

    154562-image.png

    Please note, if your actually query not returns anything back. Then try to add select '1' as last statement below your query.

    Hope this will help. Please let us know if any further queries.

    -------------------

    Please consider hitting Accept Answer button. Accepted answers helps community as well.


0 additional answers

Sort by: Most helpful