Sharing Data Between Applications

作者 gopigment6fec49f4ce9d無授權條款22 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Execution skill. Use when sharing metrics or lists between Pigment Applications via Libraries and cross-Application formula references.

AI 產生的概覽

說明如何透過程式庫與跨應用公式,在 Pigment 應用程式之間共用指標與維度清單。

功能
說明在 Pigment 中何時需要跨應用共用、何時只要簡單的匯入快照即可。內容涵蓋共用區塊、在取用方應用程式中啟用來源程式庫,以及撰寫跨應用公式參照。也介紹透過 sharing_status 參數共用維度清單,並列出結構變更傳播、停用共用受阻等限制。
適用情境
當兩個或多個 Pigment 應用程式需要同一份資料、需要安全界線或不同團隊各自擁有資料,或由中央樞紐應用程式向多個取用方供數時使用。也適用於撰寫或排查跨應用公式參照與共用維度清單的情境。
執行需求
需要存取 Pigment 環境及其工具,用於共用區塊、啟用應用程式程式庫、列出程式庫,以及建立或更新清單。此技能不含指令碼,僅為操作說明。

Decide Whether Cross-Application Sharing Is Needed

Pigment Applications are self-contained. Data does not flow between them unless explicitly shared.

Use Cross-Application Sharing When

  • Same data needed by 2+ Applications: single source of truth, no duplication
  • Security boundary required: teams access only their Application; shared metrics expose only sanitized outputs
  • Different team ownership: source team owns calculations; consuming teams reference results
  • Hub pattern: one central Application (FX Hub, Dimension Hub) feeds many consumers

Do not share when data is used in only one Application, or when a simple import snapshot is sufficient and live linkage is unnecessary.

Share a Metric to Another Application

  1. Share the block using tool:batch_share_blocks to make it available to other Applications.
  2. In the consuming Application, activate the source Library using tool:enable_application_library.
  3. Reference the shared block in formulas using cross-Application syntax (see below).

Only share PUSH_ output metrics that other Applications need. Avoid sharing internal calculation intermediaries. Dimension lists shared across apps do not use PUSH_/PULL_; share them directly under their normal names.

Write Cross-Application Formula References

pigment
'Source Application Name'::'Block Name'

Always use the full form with Application prefix. Sharing a block also shares its underlying dimensions.

Use tool:list_application_libraries to check which Libraries are activated. A shared block is not usable until its Library is activated via tool:enable_application_library.

Changes to shared blocks in the source Application propagate automatically to all consumers.

Sharing Dimension Lists

Dimension lists are shared using the sharing_status parameter, not tool:batch_share_blocks:

  • When creating a new dimension: tool:create_list with sharing_status: "Shared"
  • When sharing an existing dimension: tool:update_list with sharing_status: "Shared"

This applies to all dimension lists including calendar time dimensions (Month, Quarter, Year).

tool:batch_share_blocks is for sharing metrics, tables, and other non-dimension blocks.

Limitations

  • Shared metrics propagate structure changes -- update shared metrics when source dimensions change.
  • Deactivating sharing is blocked while other Applications reference the block.
  • Sharing a block shares its dimensions -- dimension renames in the source affect all consumers.
  • Prefer fewer, well-dimensioned shared metrics over sharing every intermediate calculation.

來源與署名

來源:gopigment/ai-plugins位於skills/sharing-data-between-applications提交6fec49f

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架