0

Introduction to Data Action Tracing

 1 year ago
source link: https://blogs.sap.com/2023/02/09/introduction-to-data-action-tracing/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
February 9, 2023 5 minute read

Introduction to Data Action Tracing

Overview

With the Q1/2023 release of SAP Analytics Cloud we are excited to introduce Data Action Tracing, a highly requested capability which allows debugging of your Data Actions directly within the design time experience.

We distinguish tracing from debugging only insofar as the latter includes specific break points and similar capabilities which may not be fully suited to a mixed operation paradigm such as Data Actions.   Beyond that, however, Data Action Tracing should provide all the necessary capabilities to help alleviate existing challenges associated with troubleshooting Data Actions and Advanced Formulas steps including:

  • Assignment of tracepoints before/after any Data Action step, and within Advanced Formula steps
  • Execution and review of trace results in-line within the Data Action designer
  • Review trace run history including typical Data Action performance metrics via the monitor

Tracing Details

Navigating the Tracer

Now when you create a new Data Action or open an existing one, a new “Tracing” toolbar item is visible which will toggle the display of the tracing side panel.   The side panel is where you interact with the tracer including viewing existing tracepoints, executing the trace, reviewing trace execution parameters, as well as consuming trace results.

image001.gif

Defining Tracepoints

Regardless of whether the tracing side panel is active, you can set tracepoints in two ways.  First, you can define tracepoints before or after any data action step by clicking on the corresponding arrow in the step overview panel on the left of the screen.  Second, in the case of Advanced Formula steps, you can click to the left of the line number for any DATA() or DELETE() statements you would like to trace.    In the latter case, where a tracepoint is set on a statement which resides within a loop (foreach or for), the user will be given the opportunity to further specify the conditions under which the tracepoint will be effective.  The maximum number of traced iteration results for any given DATA() or DELETE() statement is 10 so as to manage the overall size and performance of the trace.   In total, the the maximum number of tracepoints allowed for any given data action is 20, and this includes tracepoints which may have been defined on embedded steps.

SetTP.gif

If, after defining specific tracepoints, there is a structural change to the data action itself (e.g., changing parameter settings, reordering steps, script changes, etc), existing tracepoints will remain and track with the updates.  However, these will appear as hollow dots to indicate that the data action updates have occurred, but that these updates have yet to be saved.   In this scenario, execution of the trace will not be possible until the data action is saved, after which the tracepoints will once again appear as solid dots.

UpdateDA.gif

Executing the Trace

After setting at least one tracepoint, the trace can be initiated by clicking the “Run” button on the tracing side panel (note at present that only a single trace instance is preserved, so each execution of the trace will overwrite any previous trace results).   At that point, assuming the data action includes at least one parameter with dynamic input, a parameter dialog will appear allowing for custom filtering of the execution scope to be included within the trace (unlike the story there is not input control or filter which may populate these).  However, where default values have been defined for a dynamic parameter, that default selection will appear in the parameter dialog.

RunDA.gif

Navigating Trace Results

Once execution of the trace is complete, additional information will become visible in the tracing side panel.  Where individual tracepoints were defined on an advanced formula steps within a for or foreach loop, sub-tracepoints will appear for each conditional statement that was met (up to a maximum of 10 iteration results) .  Furthermore, additional information will appear below the tracepoints in the “Watch Area”.   This will include the execution parameters relevant to that tracepoint and, for advanced formula steps, will also include calculation scope, variables relevant to that step, and a Lookup table reference where VARIABLEMEMBER is used (discussed below).

On any given tracepoint, you can click the “Show Table” button on the banner of the watch area.   This will expose the in-line table available with the tracer, which can be filtered as required (i.e., rows, columns, and context filter) to focus on the specific data relevant for the trace.   Thereafter, selecting any tracepoint from the tracing side panel will render the relevant data at that commit point, and navigating the tracepoints in sequence will show the data changes between steps (highlighted in yellow).

NavTrace.gif

VARIABLEMEMBER Tracing

In some cases, a DATA() statement may write values to a VARIABLEMEMBER.  This is a virtual dimension member or accumulator for use within the context of that advanced formula step.  For these types of DATA() statements, the results are not integrated into or persisted in the underlying version, but rather are discarded upon completion of the step.  For this reason we have a different method to consume the results of the VARIABLEMEMBER trace, which occurs via a Lookup table accessible to any given tracepoint which is tracking a DATA() statement referencing a VARIABLEMEMBER.

VarMem.gif
 

Trace Consumption outside of the Designer

Data Action tracing makes use of the private versioning capabilities available within SAP Analytics Cloud.  When a trace is executed, a dedicated private version is created for the executing user (note that only a single trace version can exist for a user/data action), with each tracepoint effectively representing a batch commit to that private version.   Given the use of private versioning in this manner, it is worth noting then that trace versions are visible within the Version Management panel.  These versions can thus be reported on using any story widget, and tracepoint history is visible via the version history panel.

Story_Consumption.gif

Execution History via the Data Action Monitor

Like other methods of executing a data action, each trace instance is tracked and available within the Data Action Monitor.   This gives the person maintaining the data action the ability to ensure, not only the accuracy of results as they make changes to the logic, but also to baseline and track performance throughout the troubleshooting and optimization process.  The author can review each run instance and validate the execution duration of each step, as well as the specific number of records impacted.

Data%20Action%20Monitor
 

Summary

Given their increasing number, complexity, and the essential role that Data Actions play in any planning deployment, the broad interest from the community in native support for debugging capabilities has been no surprise.   Data Action Tracing, thus, represents is a substantial step forward in helping our customers and partners to quickly and easily create large, complex workflows and calculations to achieve their last mile planning requirements.  For these reasons, it is our strong expectation that Data Action Tracing will significantly reduce cost of ownership and expedite time to value for our customers as they expand their SAP Analytics Cloud footprint.  Our team has been working very hard to get this new feature shipped with the Q1/2023 release, and we are very much looking forward to hearing your feedback.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK