简体   繁体   English

使用 Databricks (JDBC) 将(本地)SQL 数据迁移到 Azure

[英]Migrate (on-prem) SQL data to Azure with Databricks (JDBC)

Is it possible to use the JDBC connector https://docs.databricks.com/data/data-sources/sql-databases.html in order to get data from local SQL server.是否可以使用 JDBC 连接器https://docs.databricks.com/data/data-sources/sql-databases.html从本地 SQL 服务器获取数据。 (and export it to delta lake) (并将其导出到三角洲湖)

Using:使用:

jdbcUrl = "jdbc:mysql://{0}:{1}/{2}".format(jdbcHostname, jdbcPort, jdbcDatabase)
connectionProperties = {
  "user" : jdbcUsername,
  "password" : jdbcPassword,
  "driver" : "com.mysql.jdbc.Driver"
}

Irrespective if you have MySql or SQL Server, Databricks driver supports both as outlined in the article you linked.无论您使用的是 MySql 还是 SQL Server,Databricks 驱动程序都支持您链接的文章中概述的两者。 From the perspective of access to on-prem - the answer is yes, however Databricks must be able to connect to it.从访问本地的角度来看 - 答案是肯定的,但是 Databricks 必须能够连接到它。 Usually this will mean deploying your Databricks clusters into your VNET which has access to your on-prem resources, eg following the guidance here通常这意味着将 Databricks 集群部署到可以访问本地资源的 VNET 中,例如遵循此处的指南

Alternatively you could use Azure Data Factory self-hosted integration runtime to move the data to a staging/"Bronze" storage in the cloud and pick it up with a Databricks task to move it to a Delta table.或者,您可以使用 Azure 数据工厂自承载集成运行时将数据移动到云中的暂存/“青铜”存储,并使用 Databricks 任务将其提取以将其移动到增量表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM