How do I see where a value in my results came from?

Prev Next

When a number in your results looks wrong, the first question is where it came from. The Luminesce Query Editor can show you exactly how a result was put together: the providers it read, the joins and filters along the way, and what each calculated column is worked out from, even through views and other providers. If Candela is available in your domain, it can explain it all in plain words.

Prerequisites

  • Access to the Luminesce Query Editor in the LUSID web app, under Data Virtualisation > Query Editor.

  • Lineage turned on, which it is by default. If it's off, turn on Show query results lineage in editor on the Data Virtualisation > Settings page, then run the query again.

Methods

Method 1: See how the whole result was put together

  1. Run the query.

  2. On the toolbar above the results, select Show table lineage. It appears when Luminesce has lineage for the result.

A window shows the result as a diagram, from the providers it reads through every join, filter and calculation to the result itself.

  • Select a part of the diagram to see its Node details, such as the formula behind a calculated column, and its Documentation.

  • The Legend says what each kind of part is.

  • Use Expand all nodes and Collapse all nodes to show or hide the detail of a large diagram.

Each query in a query set has its own lineage. Select the query's tab in the results first.

For example, this query reads one portfolio scope's holdings into a variable, joins them to their instruments, and totals the cost by asset class. Its lineage shows both providers, the variable, the filter on the scope and the join:

@@scope = select 'Analytics-Examples';

@holdings =
    select PortfolioCode, LusidInstrumentId, Units, CostAmountPortfolioCurrency
    from Lusid.Portfolio.Holding
    where PortfolioScope = @@scope
      ;

select
     i.InferredAssetClass                                          as AssetClass,
     count(distinct h.PortfolioCode)                               as Portfolios,
     count(distinct h.LusidInstrumentId)                           as Instruments,
     sum(h.CostAmountPortfolioCurrency)                            as Cost
from @holdings h
inner join Lusid.Instrument i
    on i.LusidInstrumentId = h.LusidInstrumentId
group by i.InferredAssetClass
order by Cost desc

Method 2: Explain one column

A marker in a column's heading shows it's worked out rather than read straight from a provider. Hover over it to see which:

  • Calculation: calculated from other values.

  • Aggregation: a total, count or other aggregate.

To see what a column is worked out from, open the column's menu and select Explain. A window shows the column's lineage as a diagram, in the same way as Method 1.

Method 3: Ask Candela to explain it

In the lineage window, switch from Graph to Explain. Candela, FINBOURNE's AI agent, describes in plain words how the result or column was arrived at, and you can ask it follow-up questions.

Candela availability

Candela is currently available to some customers only. If it isn't available in your domain, the lineage window shows only Graph, and Methods 1 and 2 still work.

Method 4: See a provider's lineage before you query it

Views and some providers show their lineage in the Catalogue too, before you run anything. Select Show table lineage on a provider's row, or Show field lineage on one of its fields. See How do I find providers and fields in the catalogue?

Troubleshooting

Show table lineage isn't on the toolbar

Luminesce has no lineage for this result. Check that Show query results lineage in editor is on, then run the query again: lineage is worked out when the query runs, so results from before you turned it on don't have it.

Explain isn't in a column's menu

Luminesce can't say where that column's values come from, for example because the provider doesn't describe its own columns.