測試 Power BI 的範本內容套件Testing template content packs for Power BI

在送出內容套件以供發行之前,您可以透過多種方式測試該內容套件。There are multiple ways to test your content pack before submitting it for publishing.


如果您的內容套件使用您開發的自訂資料連接器,您就無法如下所述測試資料重新整理或範本內容套件。If your content pack uses a custom Data Connector that you developed, you will not be able to test the data refresh or the template content pack as described below. 如果是這樣,請前往提交您的內容套件,Power BI 小組會和您一起測試您的內容套件。If that is the case, please proceed to submit your content pack and the Power BI team will work with you on testing your content pack.

測試排程的資料重新整理Testing Scheduled Data Refresh

範本內容套件利用 中的重新整理,在連線時以客戶資料來實例化內容套件。Template content packs leverage Refresh in to instantiate a content pack with the customer's data when they connect. 在公開推出內容套件之前,您可以透過您已建立的 Desktop 檔案來測試此流程。Prior to the content pack being publicly available, you can test this flow with the Desktop file you've created.

上傳檔案後,選取資料集旁的 [...],並選取 [排程重新整理]。After uploading the file, select the "…" next to the dataset and select Schedule Refresh. 設定來源的認證。Configure credentials for the source. 請確定您的資料集已成功重新整理,請嘗試 [立即重新整理] 和 [排程的重新整理]。Make sure that your dataset refreshes successfully, try both "Refresh Now" and "Scheduled Refresh". 如果重新整理發生任何一次失敗,請查看錯誤訊息,並驗證您的查詢和終端系統。If your refresh hits any failures, check the error message and validate your queries and your end system.

其他重新整理秘訣Additional refresh tips

  • 嘗試排程重新整理時,應該只會偵測到一個資料來源Only one data source should be detected when you try to schedule refresh
  • 測試連接應該會表示您的使用者將可載入內容套件。Test connection should indicate that your user will be able to load the content pack. 若非如此,請確定您的查詢可處理其他錯誤情況。If that's not the case, ensure your queries handle the additional error cases.
  • 重新整理應在合理的時間內完成,建議為 5 分鐘內Refresh should complete in a reasonable time, ~5mins is suggested


測試範本Testing Templates

除了範本內容套件不會在資料集中包含實際資料以外,其與現有的解決方案非常類似。A template content pack is similar to existing solutions except that it does not include the actual data in the dataset. 相反地,使用者使用或實例化範本時,系統會提示其輸入參數和認證才能連線。Instead, when a user consumes or instantiates a template, they are prompted for parameters and credentials in order to connect. 連線之後,其便會在儀表板、報表和資料集中看到自己的資料。Once connected, they'll see their own data in the dashboard, report and datasets.

使用者將內容套件具現化之後,即可存取資料庫設定 (包括排程的重新整理),資料集上的任何 RLS 設定都不會隨內容套件發行。After a user instantiates the content pack they have access to the dataset settings including scheduled refresh, any RLS settings on the dataset are not published with the content pack.


範本內容套件只能包含 1 個儀表板、1 份報表和 1 個資料集。Template content packs can only include 1 dashboard, 1 report and 1 dataset. 請參閱撰寫頁面中的限制清單。Please see the list of restrictions in the authoring page.

若要為您的租用戶建立範本,請與您的 Power BI 系統管理員共同啟用下列功能切換。To enable template creation for your tenant, please work with your Power BI admin to enable the feature switch below.


啟用後,您會在 [建立內容套件] 底部看到一個核取方塊,該核取方塊可讓您將範本內容套件發行至您的組織。Once enabled, you'll see a checkbox at the bottom of "Create content pack", allowing you to publish a template content pack to your organization.



我們建議您在內容套件中以一致的方式命名儀表板、報表和資料集。We suggest naming your dashboard, report and dataset consistently across your content pack. 這些名稱是硬式編碼,且對所有使用者都會相同,因此使用您的產品/案例名稱可讓您的客戶更容易找出這些項目。These names are hardcoded and will be the same for all users, so using your product/scenario name can make it easier for your customers to locate.

其他範本秘訣Additional template tips

  • 確定您在查詢中指定的參數對使用者具有意義Ensure the parameters you specified in the queries are meaningful to your end users
  • 請考慮使用者等候排程的重新整理完成的時間長度Consider how long your end user will be waiting for scheduled refresh to complete



透過 Microsoft AppSource 的提交程序會讓您在 的服務內容套件庫發行您的範本內容套件,以及在 Microsoft AppSource 中列示您的內容套件。The submission process through Microsoft AppSource will allow you to publish your template content pack in the service content packs gallery in as well as list your content pack in Microsoft AppSource.

送出前Before submission

  • 針對內容套件中的每個成品檢閱撰寫秘訣Review the authoring tips for each of the artifacts within the content pack
  • 透過各種帳戶和資料條件進行測試和連線。Test and connect with various accounts and data conditions. (如果您已開發自己自訂的資料連接器,請略過此步驟。)(Skip this step if you developed your own custom Data Connector)
  • 檢閱所有視覺特效,並仔細查看是否有拼字錯誤的項目Review all visuals, look carefully for misspelled items
  • 確定內容套件可妥善回應問與答,我們建議您在資料模型中至少測試 30 個不同的問題。Ensure the content pack responds well to Q&A, we suggest testing at least 30 varied questions across the data model. (如果您已開發自己自訂的資料連接器,請略過此步驟。)(Skip this step if you developed your own custom Data Connector)


作好提交準備後,請前往 AppSource 的應用程式提交頁面並提交您的資訊。Once ready to submit, visit the Apps submission page on AppSource and submit your information. 請務必從可用的產品清單中選取 Power BIPlease make sure to select Power BI from the available list of products

Power BI 小組會檢閱您提交的內容,並與您連絡以確定所有成品都符合提交需求。The Power BI team will review your submission and will reach out to you to ensure all the artifacts meets the submission requirements. 除了正在完成的項目以外,我們也會驗證提供的儀表板和報表品質,並確保其符合應用程式中所述的商務案例。In addition to being complete, we'll also validate the quality of the dashboard and reports provided ensuring they meet the business scenario described in the application.


遵循與原始送出類似的流程來更新您的內容套件。Updating your content pack follows a similar flow to the original submission.