從 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 資料庫的 DataFrame 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.