Skip to main content

TableAnalyticMerg

TableAnalyticMerge

The TableAnalyticMerge function is only supported in Studio. The function returns a Data Table variable that is filled with results produced by another analytic. To better understand how it works, imagine you have an analytic that runs every time a case is published storing some relevant information about the case (as an example the DX indexes) in a variable, and then imagine you want to read all DX indexes of the last month; with TableAnalyticMerge you can do that

The function allows to specify the analytic (the one who produced the results), the search period (start and end time), the specific Sigmafine Analysis (or all), the specific model (or all) and the name of the variable that we want to read.

Prototype

    TableAnalyticMerge(Analytic ; Model ; PluginId; Start ; End ; Variable ; AdditionalKeys )

Arguments

    Analytic                String                  By value

Argument contains the name of the analytic who produced the results to
be collected.

Model String By value

Optional argument that contains the unique identifier of the model. If a
model is passed, then only the results produced for the specific model
will be collected.

PluginId String By value

Optional argument that contains the unique identifier of the Analysis.
If an analysis is passed, then only the results produced for the
specific analysis will be collected.

Start Number By value

Argument contains the search start time. Only those results obtained from a
case started at or after the Start parameter will be collected.

End Number By value

Argument contains the search end time. Only those results obtained from
a case started at or before the End parameter will be collected.

Variable String By value

Argument contains the name of the variable containing the information to
be collected.

AdditionalKeys String By value

Optional arguments that contain the additional information to be added
to the data table. None or a combination of keys can be
specified (see supported AdditionlKeys).

Returns

    Data Table

An empty data table, without columns and rows, is returned if there are
no values to be merged.

Exception

    Undefined

Undefined is returned if the analytic (passed by name) is not found.
Undefined is returned if improper additional keys are defined.
Undefined is returned if the variable name is empty or Undefined.

Supported AdditionalKeys

KeyDescription
CaseIdThe CaseId column is added to the table and each record will be filled with the case unique identifier.
PluginIdThe PluginId column is added to the table and each record will be filled with the Analysis unique identifier
PluginNameThe PluginName column is added to the table and each record will be filled with the name of the Analysis to which the read data refers.
CaseStartThe CaseStart column is added to the table and each record will be filled with the start time of the case to which the read data refers.
CaseEndThe CaseEnd column is added to the table and each record will be filled with the end time of the case to which the read data refers.
ModelIdThe ModelId column is added to the table and each record will be filled with the unique identifier of the model to which the read data refers.

Example

  $$DxSeries = TableAnalyticMerge('Dx Tx On case'; {modelid}; GetAnalysisRuleId( $$SelectedA ) ; DateToEpoch($$Start) ; DateToEpoch($$End); '$$DX' ; 'PluginName'; 'CaseId' )

The variable $$DxSeries will be assigned with a table containing as many rows as many analytic results will be found according to the passed parameters.

PlaceholderDescription
Dx Tx On caseThe name of the analytic to be searched, that is, the name of the analytic who produced the results you want to read.
{ModelId}Read only the results produced for the same model that is currently used by the analytic running the function.
GetAnalysisRuleId($$SelectedA)Read only the results produced for the Sigmafine Analysis whose name is contained in the analytic variable $$SelectedA.
DateToEpoch($$Start)The search start time. The analytic variable $$Start contains the Date and time and it's transformed to Epoch.
DateToEpoch($$End);The search end time. The analytic variable $$End contains the date and time and it's transformed to Epoch.
'$$DX'The name of the variable, of type Table, to be read from the collected analytic results.
'PluginName'; 'CaseId'The additional information to be added to each row of the returned table.
In the example each row will contain the name of the Sigmafine Analysis and the case unique Id.