Sharing Queries across Data Workspaces

In complex data ecosystems, it is common to encounter situations where you need to use the same data queries across multiple projects.

Instead of duplicating these resources, Data Project dependency management allows you to create and manage shared catalogs of queries that you can reference across different Data Projects and Data Workspaces. This not only promotes reuse but also simplifies maintenance and version control.

Context: Imagine you are building several Data Projects, each focused on a specific business domain. These Data Projects need access to a set of standard queries, for example, to extract KPIs, metrics, or to join common datasets. Rather than copying these queries into each Data Project, you can create a dedicated Data Project to act as a shared catalog, and maintain your queries in this catalog. Then you can reference these queries from other Data Projects as required.

  1. Create a shared Data Project to store your data queries. For example, SharedQueryCatalog.
  2. Instantiate the shared Data Project in a Data Workspace.
  3. In Data Perspective Studio, create the queries you want to share.

    Organize them by logical domain or business function. For example, "Sales", "Supply chain", "Product".

  4. Create a new Data Project. For example, MarketingDashboard or ProductAnalytics
  5. Instantiate the new Data Project in a Data Workspace.
  6. In the Data Workspace, go to Dependencies and create a dependency from the new Data Project to the shared Data Project.

Result:

With this approach:

  • In any visualization, you can select a data query from the shared Data Workspace.
  • Instead of recreating queries, you can reference the queries from the shared catalog in your page views etc.
  • Once referenced, these queries behave like local queries, but with a key difference: their logic lives in the central catalog. This ensures consistency. Updates made in the shared catalog automatically reflect wherever the query is used. You avoid "drift" where different versions of the same query exist in different Data Projects.
Tip: You can version-control the shared catalog to review and approve it independently of individual Data Project timelines using commit and branches. Yet, this is not mandatory for sharing.