Can I query perform SQL query by joining table 1 from (Prodution) database 1 to table 2 from (Production) databse 2? The result to be saved as a table in database 3 (Development)

Krishna Kumar 21 Reputation points
2022-02-02T05:08:24.613+00:00

Perform AZURE SQL query by joining table 1 from (Azure Prodution) database 1 to table 2 from (Azure Production) database 2?
The result to be saved as a table in database 3 (Development)

Eg.

SELECT T1.CustomerID, T2.CustomerName
FROM database1.SalesTable AS T1
LEFT JOIN database2.CustomerTable AS T2

ON database1.SalesTable.CustomerID = database2.CustomerTable

Azure SQL Database
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,579 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,422 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,643 questions
Azure Data Catalog
Azure Data Catalog
An Azure service that serves as a system of registration and system of discovery for enterprise data assets.
97 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandan Hegde 29,896 Reputation points MVP
    2022-02-02T05:39:35.36+00:00

    Hey,
    It is possible by couple of ways:

    1) Create an external table in either of the Production database:
    https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-query-getting-started-vertical

    Then in Azure data factory use a copy activity to have your query as source and your sink as the table 3 in database dev.
    https://learn.microsoft.com/en-us/azure/data-factory/connector-sql-server

    But based on the amount of data there might be performance issues due to elastic query so we can go with the below approach :

    2) use data flow to join both the data from table 1 and table 2 and copy into table 3

    0 comments No comments

0 additional answers

Sort by: Most helpful