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 从公开仓库中收录这些内容。

举报或申请下架