[英]Azure Data Factory - Azure SQL Server Destination Schema
I need to copy several hundred tables from an on-premise SQL Server to an Azure SQL Server using ADF. 我需要使用ADF将几百张表从本地SQL Server复制到Azure SQL Server。 I don't have access to the DB or the network it's on, but I was able to get the on-prem data gateway installed, given an AD account with sufficient DB privileges, and then use the "Copy Data (Preview)" to copy all tables to blob storage.
我没有访问数据库或数据库所在的网络的权限,但是我可以安装本地数据网关,并为其指定具有足够数据库特权的AD帐户,然后使用“复制数据(预览)”来将所有表复制到Blob存储。
My problem is that I don't have access to the DB's schema, so I can't easily provision the Azure SQL Server with the necessary tables/columns since there are several hundred tables & performing manually would be extremely time consuming. 我的问题是我无权访问数据库的架构,因此我无法轻松地为Azure SQL Server配备必要的表/列,因为有数百个表,并且手动执行将非常耗时。 I found that copying to an Azure Data Warehouse has a "Auto table creation" feature & I am able to copy from on-prem SQL Server directly to Azure DW without defining a schema at the destination, but this isn't supported on Azure SQL Server.
我发现复制到Azure数据仓库具有“自动创建表”功能,而且我可以直接从本地SQL Server复制到Azure DW,而无需在目标位置定义架构,但是Azure SQL不支持此功能。服务器。
Is there a way to obtain the same script/method that provisions the Azure DW schema & use it for Azure SQL Server? 有没有一种方法可以获取准备Azure DW架构并将其用于Azure SQL Server的相同脚本/方法? Is there any other way to obtain the source DB's schema via the on-prem data gateway?
还有其他方法可以通过本地数据网关获取源数据库的架构吗?
given that you were able to run the Copy Data tool to extract data out of on-premises SQL Server, you must have credentials to access the database. 鉴于您能够运行“复制数据”工具以从本地SQL Server中提取数据,因此您必须具有访问数据库的凭据。 Can you run SSMS (SQL Server Management Studio) on the on-prem data gateway and examine/extract the schema?
您可以在本地数据网关上运行SSMS(SQL Server Management Studio)并检查/提取架构吗?
"Auto table creation" feature is currently only available for Azure Data Warehouse. “自动表创建”功能当前仅适用于Azure数据仓库。 Supporting this feature when loading into Azure SQL Server is on our backlog but we don't have a committed timeline for this yet.
加载到Azure SQL Server中时支持此功能,但我们尚未为此提交时间表。
Shirley Wang 王雪莉
Couldn't you use DMG to run a query against the database to generate the schema for your tables, assuming your AD account has read access to the metadata? 假设您的AD帐户对元数据具有读取权限,那么您是否可以使用DMG对数据库运行查询以生成表的架构?
So with your pipeline, instead of it selecting * from each table, have it run a query to exract the schema, some examples here: How can I show the table structure in SQL Server query? 因此,对于您的管道,不是让它从每个表中选择*,而是让它运行查询以提取架构,请参见此处的一些示例: 如何在SQL Server查询中显示表结构?
You would then output that to a blob. 然后,您将其输出到Blob。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.