<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 管理連接 Airflow需要知道如何連接到您的環境。 其他系統和服務的主機名,端口,登錄名和密碼等信息在UI的`Admin-&gt;Connection`部分中處理。 您將創作的管道代碼將引用Connection對象的“conn_id”。 ![https://airflow.apache.org/_images/connections.png](https://box.kancloud.cn/5786ccc0ebfa016fb953a915eeb1c068_689x318.jpg) 可以使用UI或環境變量創建和管理連接。 有關更多信息,請參閱[Connenctions Concepts](https://apachecn.github.io/airflow-doc-zh/concepts.html)文檔。 ## 使用UI創建連接 打開UI的`Admin-&gt;Connection`部分。 單擊“ `Create`鏈接以創建新連接。 ![https://airflow.apache.org/_images/connection_create.png](https://box.kancloud.cn/0400e54422e0af91f468637d67f13726_516x316.jpg) 1. 使用所需的連接ID填寫`Conn Id`字段。 建議您使用小寫字符和單獨的帶下劃線的單詞。 2. 使用`Conn Type`字段選擇連接類型。 3. 填寫其余字段。 有關屬于不同連接類型的字段的說明,請參閱連接類型。 4. 單擊“ `Save`按鈕以創建連接。 ## 使用UI編輯連接 打開UI的`Admin-&gt;Connection`部分。 單擊連接列表中要編輯的連接旁邊的鉛筆圖標。 ![https://airflow.apache.org/_images/connection_edit.png](https://box.kancloud.cn/e7876d188ee69467acaf54a59584d20d_516x238.jpg) 修改連接屬性,然后單擊“ `Save`按鈕以保存更改。 ## 使用環境變量創建連接 可以使用環境變量創建氣流管道中的連接。 環境變量需要具有`AIRFLOW_CONN_` for Airflow的前綴, `AIRFLOW_CONN_` URI格式的值才能正確使用連接。 在引用Airflow管道中的連接時, `conn_id`應該是沒有前綴的變量的名稱。 例如,如果`AIRFLOW_CONN_POSTGRES_MASTER`名為`postgres_master`則環境變量應命名為`AIRFLOW_CONN_POSTGRES_MASTER` (請注意,環境變量必須全部為大寫)。 Airflow假定環境變量返回的值為URI格式(例如`postgres://user:password@localhost:5432/master`或`s3://accesskey:secretkey@S3` )。 ## 連接類型 ### Google云端平臺 Google Cloud Platform連接類型支持[GCP集成](https://apachecn.github.io/airflow-doc-zh/integration.html) 。 #### 對GCP進行身份驗證 有兩種方法可以使用Airflow連接到GCP。 1. 使用[應用程序默認憑據](https://google-auth.readthedocs.io/en/latest/reference/google.auth.html) ,例如在Google Compute Engine上運行時通過元數據服務器。 2. 在磁盤上使用[服務帳戶](https://cloud.google.com/docs/authentication/)密鑰文件(JSON格式)。 #### 默認連接ID 默認情況下使用以下連接ID。 ``` bigquery_default ``` 由[`BigQueryHook`](https://apachecn.github.io/airflow-doc-zh/integration.html "airflow.contrib.hooks.bigquery_hook.BigQueryHook")鉤子使用。 ``` google_cloud_datastore_default ``` 由[`DatastoreHook`](https://apachecn.github.io/airflow-doc-zh/integration.html "airflow.contrib.hooks.datastore_hook.DatastoreHook")鉤子使用。 ``` google_cloud_default ``` 由[`GoogleCloudBaseHook`](https://apachecn.github.io/airflow-doc-zh/code.html "airflow.contrib.hooks.gcp_api_base_hook.GoogleCloudBaseHook") , [`DataFlowHook`](https://apachecn.github.io/airflow-doc-zh/integration.html "airflow.contrib.hooks.gcp_dataflow_hook.DataFlowHook") , [`DataProcHook`](https://apachecn.github.io/airflow-doc-zh/code.html "airflow.contrib.hooks.gcp_dataproc_hook.DataProcHook") , [`MLEngineHook`](https://apachecn.github.io/airflow-doc-zh/integration.html "airflow.contrib.hooks.gcp_mlengine_hook.MLEngineHook")和[`GoogleCloudStorageHook`](https://apachecn.github.io/airflow-doc-zh/integration.html "airflow.contrib.hooks.gcs_hook.GoogleCloudStorageHook")掛鉤使用。 #### 配置連接 ``` Project Id (required) ``` 要連接的Google Cloud項目ID。 ``` Keyfile Path ``` 磁盤上[服務帳戶](https://cloud.google.com/docs/authentication/)密鑰文件(JSON格式)的路徑。 如果使用應用程序默認憑據則不需要 ``` Keyfile JSON ``` 磁盤上的[服務帳戶](https://cloud.google.com/docs/authentication/)密鑰文件(JSON格式)的內容。 如果使用此方法進行身份驗證,建議[保護您的連接](secure-connections.html) 。 如果使用應用程序默認憑據則不需要 ``` Scopes (comma separated) ``` 要通過身份驗證的逗號分隔[Google云端范圍](https://developers.google.com/identity/protocols/googlescopes)列表。 注意 使用應用程序默認憑據時,將忽略范圍。 請參閱[AIRFLOW-2522](https://issues.apache.org/jira/browse/AIRFLOW-2522) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看