建立 Apache Hive on Azure HDInsights 基本連接使用 Flow Service API

注意

此 Apache Hive on Azure HDInsights 連接器為測試版。 請參閱 來源概觀 有關使用測試版標籤連接器的詳細資訊。

基本連線代表來源和Adobe Experience Platform之間已驗證的連線。

本教學課程會逐步引導您完成建立基礎連線的步驟 Apache Hive on Azure HDInsights (下稱「Hive")使用 Flow Service API.

快速入門

本指南需要妥善了解下列Adobe Experience Platform元件:

  • 來源: Experience Platform 可讓您從各種來源擷取資料,同時使用來建構、加標籤及增強傳入資料 Platform 服務。
  • 沙箱: Experience Platform 提供可分割單一沙箱的虛擬沙箱 Platform 例項放入個別的虛擬環境,以協助開發及改進數位體驗應用程式。

以下各節提供您需要了解的其他資訊,以便成功連接到 Hive 使用 Flow Service API。

收集所需憑據

為了 Flow Service 連線 Hive,您必須提供下列連線屬性的值:

憑據 說明
host 的IP位址或主機名稱 Hive 伺服器。
username 您用來存取的使用者名稱 Hive 伺服器。
password 與用戶對應的密碼。
connectionSpec.id 連接規範返回源的連接器屬性,包括與建立基連接和源連接相關的驗證規範。 的連接規範ID Hive 為: aac9bbd4-6c01-46ce-b47e-51c6f0f6db3f

如需快速入門的詳細資訊,請參閱 此配置單元文檔.

使用平台API

如需如何成功呼叫Platform API的詳細資訊,請參閱 Platform API快速入門.

建立基本連接

基本連接在源和平台之間保留資訊,包括源的驗證憑據、連接的當前狀態和唯一基本連接ID。 基本連線ID可讓您從來源探索和導覽檔案,並識別您要擷取的特定項目,包括其資料類型和格式的相關資訊。

若要建立基本連線ID,請向 /connections 端點提供 Hive 驗證憑證作為要求參數的一部分。

API格式

POST /connections

要求

下列請求會為 Hive:

curl -X POST \
    'https://platform.adobe.io/data/foundation/flowservice/connections' \
    -H 'Authorization: Bearer {ACCESS_TOKEN}' \
    -H 'x-api-key: {API_KEY}' \
    -H 'x-gw-ims-org-id: {ORG_ID}' \
    -H 'x-sandbox-name: {SANDBOX_NAME}' \
    -H 'Content-Type: application/json' \
    -d '{
        "name": "Apache Hive test connection",
        "description": "A test connection for Apache Hive",
        "auth": {
            "specName": "HDInsights Basic Authentication",
            "params": {
                "connectionString": "{CONNECTION_STRING}"
            }
        },
        "connectionSpec": {
            "id": "aac9bbd4-6c01-46ce-b47e-51c6f0f6db3f",
            "version": "1.0"
        }
    }'
參數 說明
auth.params.connectionString 與 Hive 帳戶。
connectionSpec.id 此 Hive 連接規範ID: aac9bbd4-6c01-46ce-b47e-51c6f0f6db3f.

回應

成功的回應會傳回新建立連線的詳細資訊,包括其唯一識別碼(id)。 在下一個教學課程中探索資料時需要此ID。

{
    "id": "9f6e4311-e032-4c00-ae43-11e032bc00c7",
    "etag": "\"f4004fb7-0000-0200-0000-5e865c1e0000\""
}

後續步驟

依照本教學課程,您已建立 Apache Hive on Azure HDInsights 基本連接使用 Flow Service API。 您可以在下列教學課程中使用此基本連線ID:

本頁內容