从 Azure Databricks 连接到数据源Connect to data sources from Azure Databricks

本文提供了指向 Azure 中可以连接到 Azure Databricks 的所有不同数据源的链接。This article provides links to all the different data sources in Azure that can be connected to Azure Databricks. 请按照这些链接中的示例操作,将 Azure 数据源(例如,Azure Blob 存储、Azure 事件中心等)中的数据提取到 Azure Databricks 群集中,并对这些数据运行分析作业。Follow the examples in these links to extract data from the Azure data sources (for example, Azure Blob Storage, Azure Event Hubs, etc.) into an Azure Databricks cluster, and run analytical jobs on them.

先决条件Prerequisites

Azure Databricks 的数据源Data sources for Azure Databricks

以下列表提供了 Azure 中可用于 Azure Databricks 的数据源。The following list provides the data sources in Azure that you can use with Azure Databricks. 有关可用于 Azure Databricks 的数据源的完整列表,请参阅 Azure Databricks 的数据源For a complete list of data sources that can be used with Azure Databricks, see Data sources for Azure Databricks.

  • Azure SQL 数据库Azure SQL database

    此链接提供了用于使用 JDBC 连接到 SQL 数据库的数据帧 API,并介绍了如何控制通过 JDBC 接口进行的读取操作的并行度。This link provides the DataFrame API for connecting to SQL databases using JDBC and how to control the parallelism of reads through the JDBC interface. 本主题提供了使用 Scala API 的详细示例,并在末尾提供了 Python 和 Spark SQL 的简略示例。This topic provides detailed examples using the Scala API, with abbreviated Python and Spark SQL examples at the end.

  • Azure Data Lake 存储Azure Data Lake Storage

    此链接提供了有关如何使用 Azure Active Directory 服务主体向 Azure Data Lake Storage 进行身份验证的示例。This link provides examples on how to use the Azure Active Directory service principal to authenticate with Azure Data Lake Storage. 它还提供了有关如何从 Azure Databricks 访问 Azure Data Lake Storage 中的数据的说明。It also provides instructions on how to access the data in Azure Data Lake Storage from Azure Databricks.

  • Azure Blob 存储Azure Blob Storage

    此链接举例说明了如何使用给定容器的访问密钥或 SAS 从 Azure Databricks 直接访问 Azure Blob 存储。This link provides examples on how to directly access Azure Blob Storage from Azure Databricks using access key or the SAS for a given container. 此链接还提供了信息说明如何使用 RDD API 从 Azure Databricks 访问 Azure Blob 存储。The link also provides info on how to access the Azure Blob Storage from Azure Databricks using the RDD API.

  • Azure Cosmos DBAzure Cosmos DB

    此链接说明了如何通过 Azure Databricks 使用 Azure Cosmos DB Spark 连接器访问 Azure Cosmos DB 中的数据。This link provides instructions on how to use the Azure Cosmos DB Spark connector from Azure Databricks to access data in Azure Cosmos DB.

  • Azure 事件中心Azure Event Hubs

    此链接说明了如何通过 Azure Databricks 使用 Azure 事件中心 Spark 连接器访问 Azure 事件中心内的数据。This link provides instructions on how to use the Azure Event Hubs Spark connector from Azure Databricks to access data in Azure Event Hubs.

  • Azure SQL 数据仓库Azure SQL Data Warehouse

    此链接说明了如何通过 Azure Databricks 使用 Azure SQL 数据仓库连接器进行连接。This link provides instructions on how to use the Azure SQL Data Warehouse connector to connect from Azure Databricks.

后续步骤Next steps

若要了解可以从中将数据导入到 Azure Databricks 中的源,请参阅 Azure Databricks 的数据源To learn about sources from where you can import data into Azure Databricks, see Data sources for Azure Databricks.