共用方式為


教學課程:在 Apache Airflow 作業中執行 Hello-world DAG

注意

Apache Airflow 作業是由 Apache Airflow 提供電源。

在本教學課程中,您將在 Apache Airflow 作業中執行 hello-world DAG。 本教學課程著重於讓使用者熟悉 Apache Airflow 作業的功能和環境。

必要條件

若要開始使用,您必須滿足下列必要條件:

  • 在您的租用戶中啟用 Apache Airflow 作業。

    注意

    由於 Apache Airflow 作業處於預覽狀態,因此您必須透過租使用者管理員加以啟用。如果您已經看到 Apache Airflow 作業,您的租用戶系統管理員可能已經啟用它。

    1. 移至 [系統管理入口網站 -> 租用戶設定 -> Microsoft網狀架構下 -> 展開 [使用者可以建立和使用 Apache Airflow 作業 (預覽)] 區段。

    2. 按一下 套用。

      螢幕擷取畫面,其中顯示在租用戶中啟用 Apache Airflow。

建立 Apache Airflow 作業

  1. 您可以建立現有工作區,或建立新的工作區

  2. 展開 + New 下拉式清單 -> 按兩下 [其他選項 -> 在區段下 Data Factory -> 選取 Apache Airflow 作業 (預覽)

    螢幕擷取畫面,其中顯示按下更多選項。

    選取 Apache Airflow 作業的螢幕快照。

  3. 為專案提供適當名稱,然後按下 [建立] 按鈕。

建立 DAG 檔案

  1. 按兩下 [新增 DAG 檔案] 卡片 -> 為檔案命名,然後按下 [建立] 按鈕。

    螢幕擷取畫面,其中顯示為 DAG 檔案命名。

  2. 會顯示樣板 DAG 程式代碼。 您可以根據需求編輯檔案。

    螢幕擷取畫面,其中顯示 Microsoft Fabric 中的樣板 DAG 檔案。

  3. 按下「儲存圖示」。

    螢幕擷取畫面,其中顯示如何在 Microsoft Fabric 中儲存 DAG 檔案。

在 Apache Airflow UI 中監視 Apache Airflow DAG

  1. 已儲存的 DAG 檔案會載入 Apache Airflow UI 中。 您可以按下 [在 Apache Airflow 中監視] 按鈕以監視這些檔案。

    螢幕擷取畫面,其中顯示監視 Airflow DAG。

    螢幕擷取畫面,其中顯示已載入的 Airflow DAG。

快速入門:建立 Apache Airflow 作業