Power BI Desktop 中的資料來源

使用 Power BI Desktop,您可以連線到許多不同的來源的數據。 如需可用數據源的完整清單,請參閱 Power BI 數據源

若要查看可用的數據源,請在 Power BI Desktop功能區的 [首頁 ] 群組中,選取 [取得數據 ] 按鈕標籤或向下箭號以開啟 [ 一般數據源 ] 清單。 如果您想要的數據源未列在 [一般數據源] 底下,請選取 [更多] 以開啟 [取得數據] 對話框。

Screenshot that shows the Get data item and the Common data types menu in Power BI Desktop.

或者,選取 [取得數據] 圖示本身,直接開啟 [取得數據] 對話框。

Screenshot that shows the Get Data icon and the Get Data dialog box in Power BI Desktop.

注意

Power BI 小組會持續擴充 Power BI Desktop 和 Power BI 服務 可用的數據源。 因此,您通常會看到標示為 Beta預覽的早期工作進行中數據源版本。 標示為 Beta預覽 版的任何數據源都有有限的支援和功能,而且不應該在生產環境中使用。 此外,在數據源正式推出之前,任何標示為 BetaPreview for Power BI Desktop 的數據源可能無法用於 Power BI 服務 或其他 Microsoft 服務。

資料來源

[ 取得資料] 對話框會組織下列類別中的數據類型:

  • 全部
  • 檔案
  • Database
  • Microsoft Fabric (預覽版)
  • Power Platform
  • Azure
  • Online Services
  • 其他

[ 所有 ] 類別包含所有類別的所有數據連線類型。

檔案數據源

[ 檔案 ] 類別提供下列數據連線:

  • Excel 活頁簿
  • 文字/CSV
  • XML
  • JSON
  • 資料夾
  • PDF
  • Parquet
  • SharePoint 資料夾

資料庫數據源

資料庫類別提供下列資料連線:

  • SQL Server 資料庫
  • Access 資料庫
  • SQL Server Analysis Services 資料庫
  • Oracle Database
  • IBM Db2 資料庫
  • IBM Informix 資料庫 (搶鮮版)
  • IBM Netezza
  • MySQL 資料庫
  • PostgreSQL 資料庫
  • Sybase 資料庫
  • Teradata 資料庫
  • SAP HANA 資料庫
  • SAP Business Warehouse 應用程式伺服器
  • SAP Business Warehouse 訊息伺服器
  • Amazon Redshift
  • Impala
  • Google BigQuery
  • Google BigQuery (Microsoft Entra ID)(Beta)
  • Vertica
  • Snowflake
  • Essbase
  • AtScale 模型
  • Actian (Beta)
  • Amazon Athena
  • AtScale Cube
  • BI 連線 or
  • 數據虛擬LDW
  • Denodo
  • Exasol
  • Indexima
  • InterSystems IRIS (Beta)
  • 傑特羅 (Beta)
  • Kyligence
  • Linkar PICK 樣式 / MultiValue 資料庫 (Beta)
  • MariaDB
  • MarkLogic
  • MongoDB Atlas SQL (Beta)
  • TIBCO® 數據虛擬化
  • Dremio Software
  • Dremio Cloud

注意

某些資料庫連接器需要選取 [檔案>選項] 和 [設定>選項],然後選取 [預覽功能] 並啟用連接器來啟用它們。 如果您沒有看到先前提及的一些連接器,而且想要使用這些連接器,請檢查您的 預覽功能 設定。 另請注意,任何標示為 Beta預覽 的數據源都有有限的支援和功能,且不應用於生產環境。

Microsoft Fabric (預覽版)

Microsoft Fabric (預覽) 類別提供下列資料連線:

  • Power BI 語意模型
  • 資料流程
  • Datamarts (預覽)
  • 倉儲(預覽)
  • Lakehouses (預覽)
  • KQL 資料庫 (預覽)

Power Platform 數據源

Power Platform 類別提供下列資料連線:

  • Power BI 數據流 (舊版)
  • Common Data Service (舊版)
  • Dataverse
  • 資料流程

Azure 資料來源

Azure 類別提供下列資料連線:

  • Azure SQL Database
  • Azure Synapse Analytics SQL
  • Azure Analysis Services 資料庫
  • 適用於 PostgreSQL 的 Azure 資料庫
  • Azure Blob 儲存體
  • Azure 資料表儲存體
  • Azure Cosmos DB v1
  • Azure 資料總管 (Kusto)
  • Azure Data Lake Storage Gen2
  • Azure Data Lake Storage Gen1
  • Azure HDInsight (HDFS)
  • Azure HDInsight Spark
  • HDInsight Interactive Query
  • Azure 成本管理
  • AKS Trino 上的 Azure HDInsight (Beta)
  • Azure Cosmos DB v2 (Beta)
  • Azure Databricks
  • Azure Synapse Analytics 工作區 (Beta)
  • Azure 時間序列深入解析 (搶鮮版 (Beta))
  • AKS Trino 上的 Azure HDInsight (Beta)
  • Azure Resource Graph (Beta)

在線服務數據源

Online Services 類別提供下列數據連線:

  • SharePoint Online 清單
  • Microsoft Exchange Online
  • Dynamics 365 Online (舊版)
  • Dynamics 365 (Dataverse)
  • Dynamics NAV
  • Dynamics 365 Business Central
  • Dynamics 365 Business Central (內部部署)
  • Azure DevOps(僅限 Boards)
  • Azure DevOps Server (僅限 Boards)
  • Salesforce 物件
  • Salesforce 報表
  • Google Analytics
  • Adobe Analytics
  • appFigures (搶鮮版 (Beta))
  • Data.World - 取得資料集 (Beta)
  • GitHub (搶鮮版 (Beta))
  • LinkedIn Sales Navigator (Beta)
  • Marketo (Beta)
  • Mixpanel (技術預覽版)
  • Planview 組合
  • QuickBooks Online (技術預覽版)
  • Smartsheet
  • SparkPost (技術預覽版)
  • SweetIQ (技術預覽版)
  • Planview Enterprise Architecture
  • Zendesk (搶鮮版 (Beta))
  • 阿薩納 (Beta)
  • 組合檢視
  • Autodesk Construction Cloud
  • 自動化隨處自動化
  • Automy Data Analytics (Beta)
  • CData 連線 Cloud
  • Dynamics 365 Customer Insights (Beta)
  • Databricks
  • Digital Construction Works Insights
  • Emigo 數據源
  • Entersoft Business Suite (Beta)
  • eWay-CRM
  • FactSet Analytics
  • Palantir Foundry
  • Funnel
  • 六邊形 PPM 智慧 ® API
  • Industrial App Store
  • Intune 數據倉儲 (Beta)
  • Planview OKR (Beta)
  • Planview ProjectPlace
  • Product Insights (Beta)
  • Quickbase
  • SoftOne BI (Beta)
  • Planview IdeaPlace
  • TeamDesk (Beta)
  • Webtrends 分析 (搶鮮版 (Beta))
  • 威蒂維奧 (Beta)
  • Zoho Creator
  • Profisee
  • Viva Insights

其他資料來源

[ 其他 ] 類別提供下列數據連線:

  • Web
  • SharePoint 清單
  • OData 摘要
  • Active Directory
  • Microsoft Exchange
  • Hadoop 檔案 (HDFS)
  • Spark
  • Hive LLAP
  • R 指令碼
  • Python 指令碼
  • ODBC
  • OLE DB
  • Acterys:模型自動化與規劃(Beta)
  • Amazon OpenSearch Service (Beta)
  • Anaplan
  • Solver
  • BitSight 安全性評等
  • BQE 核心
  • Bloomberg 數據與分析
  • Celonis EMS (Beta)
  • Cherwell (搶鮮版 (Beta))
  • CloudBluePSA (Beta)
  • Cognite Data Fusion
  • 差異共用
  • Eduframe (Beta)
  • Emplifi 計量 (Beta)
  • EQuIS
  • FactSet RMS (Beta)
  • FHIR
  • Google Sheets
  • Information Grid (搶鮮版 (Beta))
  • Jamf Pro (Beta)
  • Kognitwin
  • 適用於 Power BI 的 MicroStrategy
  • OpenSearch 專案 (Beta)
  • Paxata
  • QubolePresto (搶鮮版 (Beta))
  • Roamler (搶鮮版 (Beta))
  • SIS-CC SDMX (Beta)
  • 快捷鍵 Business Insights (Beta)
  • SingleStore Direct Query 連線 or 1.0 (Beta)
  • Siteimprove
  • Socialbakers 計量 1.1.0 (Beta)
  • SolarWinds Service Desk (Beta)
  • Starburst Enterprise
  • SumTotal
  • SurveyMonkey
  • Microsoft Teams 個人分析 (Beta)
  • Tenforce (Smart)List
  • Usercube (Beta)
  • 容器深入解析
  • Wrike (Beta)
  • Zucchetti HR Infinity (Beta)
  • Bloomberg 數據與分析
  • Celonis EMS (Beta)
  • 空白查詢

注意

目前無法連線到使用 Microsoft Entra 識別碼保護的自定義數據源。

範本應用程式

您可以選取 [取得資料] 視窗底部附近的 [範本應用程式] 連結,找到組織的範本應用程式

Screenshot that shows the Template Apps link in the Get Data dialog box.

可用的範本應用程式可能會根據您的組織而有所不同。

連線到資料來源

  1. 若要連線到數據源,請從 [取得數據] 視窗中選取數據源,然後選取 [連線]。 下列螢幕快照顯示從 [其他數據連線] 類別選取的Web

    Screenshot that shows Web selected in the Other category in the Get Data dialog box.

  2. 連接視窗隨即出現。 輸入 URL 或資源連線資訊,然後選取 [ 確定]。 下列螢幕快照顯示 [ 從 Web 連線] 對話框中輸入的 URL。

    Screenshot that shows a URL in the From Web dialog box.

  3. 視數據連線而定,系統可能會提示您提供認證或其他資訊。 提供所有必要的信息之後,Power BI Desktop 會連線到數據源,並在 [導覽器] 對話框中呈現可用的數據源

    Screenshot that shows the Navigator dialog box.

  4. 選取您要載入的數據表和其他數據。 若要載入數據,請選取 [導覽器] 窗格底部的 [載入] 按鈕。 若要在載入資料之前先轉換或編輯 Power Query 編輯器 中的查詢,請選取 [轉換數據] 按鈕。

這就是連線到 Power BI Desktop 中數據源的一切。 請嘗試從我們不斷成長的數據源清單連線到數據,並經常回來查看。 我們會一直繼續新增至此清單。

使用 PBIDS 檔案來取得數據

PBIDS 檔案是具有特定結構和 的 Power BI Desktop 檔案。PBIDS 擴充功能,以將其識別為 Power BI 數據源檔案。

您可以建立 PBIDS 檔案,以簡化 組織中新報表或初學者報表建立者的取得數據 體驗。 如果您從現有的報表建立 PBIDS 檔案,則開始報表作者更容易從相同的數據建置新的報表。

當作者開啟 PBIDS 檔案時,Power BI Desktop 會提示使用者驗證認證,並連線到檔案所指定的數據源。 [ 導覽器 ] 對話框隨即出現,用戶必須從該數據源選取數據表以載入模型。 如果 PBIDS 檔案中未指定任何資料庫,使用者可能也需要選取資料庫和連線模式。

從該點開始,用戶可以開始建置視覺效果,或選取 [最近的來源 ] 將一組新的數據表載入模型。

目前,PBIDS 檔案僅支援單一檔案中的單一數據源。 指定多個數據源會導致錯誤。

如何建立 PBIDS 連線檔案

如果您有現有的 Power BI Desktop PBIX 檔案已連線到您感興趣的數據,您可以從 Power BI Desktop 中匯出這些連線檔案。 建議使用這個方法,因為 PBIDS 檔案可以從桌面自動產生。 您也可以在文字編輯器中編輯或手動建立檔案。

  1. 若要建立 PBIDS 檔案,請選取 [檔案>選項] 和 [>數據源設定]。

    Screenshot that shows selecting Data source settings under Options and settings.

  2. 在出現的對話框中,選取您要匯出為 PBIDS 檔案的數據源,然後選取 [ 匯出 PBIDS]。

    Screenshot that shows the Data source settings dialog box.

  3. 在 [ 另存新檔 ] 對話框中,提供檔名,然後選取 [ 儲存]。 Power BI Desktop 會產生 PBIDS 檔案,您可以在目錄中重新命名和儲存,並與其他人共用。

您也可以在文本編輯器中開啟檔案,並進一步修改檔案,包括指定檔案本身的連接模式。 下圖顯示文字編輯器中開啟的 PBIDS 檔案。

Screenshot that shows a PBIDS file open in a text editor.

如果您想要在文字編輯器中手動建立 PBIDS 檔案,您必須指定單一連線的必要輸入,並使用 儲存盤案 。PBIDS 擴充功能。 或者,您也可以將連接 mode 指定為 DirectQueryImport。 如果mode遺失或null檔案中,系統會提示在Power BI Desktop 中開啟檔案的用戶選取 [DirectQuery] 或 [入]。

重要

如果數據來源中的數據行已加密,某些數據源將會產生錯誤。 例如,如果在匯入動作期間加密 Azure SQL 資料庫 中的兩個或多個數據行,則會傳回錯誤。 如需詳細資訊,請參閱 SQL 資料庫

PBIDS 檔案範例

本節提供常用數據源的一些範例。 PBIDS 檔類型僅支援Power BI Desktop中也支援的數據連線,但有下列例外狀況:Wiki URLS、Live 連線 和空白查詢。

PBIDS 檔案不包含驗證資訊和數據表和架構資訊。

下列代碼段顯示 PBIDS 檔案的數個常見範例,但不完整或完整。 對於其他數據源,您可以參考 git 資料源參考 (DSR) 格式以 取得通訊協議和地址資訊

如果您要編輯或手動建立連線檔案,這些範例僅供方便使用,並非完整,且不包含 DSR 格式的所有支援連接器。

Azure AS

{ 
    "version": "0.1", 
    "connections": [ 
    { 
        "details": { 
        "protocol": "analysis-services", 
        "address": { 
            "server": "server-here" 
        }, 
        } 
    } 
    ] 
}

Folder

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "folder", 
        "address": { 
            "path": "folder-path-here" 
        } 
      } 
    } 
  ] 
} 

OData

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "odata", 
        "address": { 
            "url": "URL-here" 
        } 
      } 
    } 
  ] 
} 

SAP BW

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "sap-bw-olap", 
        "address": { 
          "server": "server-name-here", 
          "systemNumber": "system-number-here", 
          "clientId": "client-id-here" 
        }, 
      } 
    } 
  ] 
} 

SAP Hana

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "sap-hana-sql", 
        "address": { 
          "server": "server-name-here:port-here" 
        }, 
      } 
    } 
  ] 
} 

SharePoint 清單

URL 必須指向 SharePoint 網站本身,而不是指向網站內的清單。 使用者取得導覽器,可讓他們從該網站選取一或多個清單,每個清單都會成為模型中的數據表。

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "sharepoint-list", 
        "address": { 
          "url": "URL-here" 
        }, 
       } 
    } 
  ] 
} 

SQL Server

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "tds", 
        "address": { 
          "server": "server-name-here", 
          "database": "db-name-here (optional) "
        } 
      }, 
      "options": {}, 
      "mode": "DirectQuery" 
    } 
  ] 
} 

文字檔

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "file", 
        "address": { 
            "path": "path-here" 
        } 
      } 
    } 
  ] 
} 

Web

{ 
  "version": "0.1", 
  "connections": [ 
    { 
      "details": { 
        "protocol": "http", 
        "address": { 
            "url": "URL-here" 
        } 
      } 
    } 
  ] 
} 

資料流程

{
  "version": "0.1",
  "connections": [
    {
      "details": {
        "protocol": "powerbi-dataflows",
        "address": {
          "workspace":"workspace id (Guid)",
          "dataflow":"optional dataflow id (Guid)",
          "entity":"optional entity name"
        }
       }
    }
  ]
}

您可以使用 Power BI Desktop 執行各種工作。 如需其功能的詳細資訊,請參閱下列資源: