Apache Pinot Hooks

Apache Pinot 是一個以 Java 撰寫的、面向列式 (column-oriented)、開源、分散式資料儲存庫。Pinot 的設計旨在以低延遲執行 OLAP 查詢。它適用於需要對不可變資料 (immutable data) 進行快速分析 (例如聚合) 的情境,並且可能需要即時資料擷取。

先決條件

PinotAdminHook

此 Hook 是 pinot-admin.sh 腳本的包裝器 (wrapper),該腳本用於管理 Pinot 叢集 (cluster) 且由 Apache Pinot 發行版提供。目前,僅實作其子命令 (subcommands) 的一小部分子集,這些子命令是用於將離線資料 (offline data) 擷取到 Apache Pinot 中(即 AddSchema、AddTable、CreateSegment 和 UploadSegment)。其命令選項基於 Pinot v0.1.0。

參數

有關參數定義,請參閱 PinotAdminHook

tests/system/apache/pinot/example_pinot_dag.py[原始碼]

@task
def pinot_admin():
    PinotAdminHook(conn_id="pinot_admin_default", cmd_path="pinot-admin.sh", pinot_admin_system_exit=True)

參考

如需更多資訊,請參閱文件,網址為 Apache Pinot 針對 PinotAdminHook<https://pinot.apache.org/> 的改進

PinotDbApiHook

此 Hook 使用標準 SQL 端點,因為 PQL 端點即將被棄用。

參數

有關參數定義,請參閱 PinotDbApiHook

tests/system/apache/pinot/example_pinot_dag.py[原始碼]

@task
def pinot_dbi_api():
    PinotDbApiHook(
        task_id="run_example_pinot_script",
        pinot="ls /;",
        pinot_options="-x local",
    )

參考

如需更多資訊,請參閱文件,網址為 Pinot 關於查詢資料的文件 <https://docs.pinot.apache.org/users/api/querying-pinot-using-standard-sql>

這個條目是否有幫助?