Post Go back to editing

How to merge captures with PullAllCaptureDataToStore?

In the ACE Remoting API, it looks like the PullAllCaptureDataToStore method accepts a string "mergeMode". However, I couldn't find any documentation on what the valid modes are. I'd like to run several captures from an ADC, and merge them into one dataset so that I can export that dataset into one file. Is this possible?

Parents
  • Hi,

    This is possible but there is more to it than just adding the merge option. The main thing I see here is a missing element in the documentation. Here are the options available for the MergeOption enum and their brief description:

    /// Overwrite any matching series with the same path and type, any others will simply be added.
    Overwrite,

    /// Only append types that are <see cref="IAppendable{T}"/>.
    AppendOnly,

    /// Append types that are <see cref="IAppendable{T}"/> and can be appended and overwrite other types.
    AppendOrOverwrite,

    /// Rename and suffix any source paths with the name of the <see cref="IDataSet"/> to be merged.
    Rename,

    /// Append all types that are <see cref="IAppendable{T}"/> and rename any other source paths to be suffixed with the name of the <see cref="IDataSet"/>.
    AppendOrRename,

    /// Do not merge.
    None

    The documentation here explains that you should be able to achieve your goal but only when the series is supporting "IAppendable". If the analyzer you are working with is not an appending graph this is not supported by default. This decision is made at the plug-in level and is not exposed to be changed by default in the application.

    You can try using AppendOnly in your pull capture data transaction (note the data set name should be the same for the existing capture, see example below). If the data is not appended the default operation is to refresh/overwrite the data because the series is not set to be appending data.

    Example transactions:

    run @AsyncDataCapture("DataSet_0")
    run PullAllCaptureDataToStore(-1, 2000, False, True, "DataSet_0", "Root::System.Subsystem_1.ADUNIT01 Board.ADUNIT01.Analysis", AppendOnly);


    Regards,

    Eoin

Reply
  • Hi,

    This is possible but there is more to it than just adding the merge option. The main thing I see here is a missing element in the documentation. Here are the options available for the MergeOption enum and their brief description:

    /// Overwrite any matching series with the same path and type, any others will simply be added.
    Overwrite,

    /// Only append types that are <see cref="IAppendable{T}"/>.
    AppendOnly,

    /// Append types that are <see cref="IAppendable{T}"/> and can be appended and overwrite other types.
    AppendOrOverwrite,

    /// Rename and suffix any source paths with the name of the <see cref="IDataSet"/> to be merged.
    Rename,

    /// Append all types that are <see cref="IAppendable{T}"/> and rename any other source paths to be suffixed with the name of the <see cref="IDataSet"/>.
    AppendOrRename,

    /// Do not merge.
    None

    The documentation here explains that you should be able to achieve your goal but only when the series is supporting "IAppendable". If the analyzer you are working with is not an appending graph this is not supported by default. This decision is made at the plug-in level and is not exposed to be changed by default in the application.

    You can try using AppendOnly in your pull capture data transaction (note the data set name should be the same for the existing capture, see example below). If the data is not appended the default operation is to refresh/overwrite the data because the series is not set to be appending data.

    Example transactions:

    run @AsyncDataCapture("DataSet_0")
    run PullAllCaptureDataToStore(-1, 2000, False, True, "DataSet_0", "Root::System.Subsystem_1.ADUNIT01 Board.ADUNIT01.Analysis", AppendOnly);


    Regards,

    Eoin

Children
  • Further to my previous comment explaining the transaction parameters, you could alternatively use the PullAllCaptureDataToFile function for your captures.

    You would have more control over your data outside of the ACE data store and you could use standard file IO code to merge your data into a single file.

    You don't need to capture the data into the ACE store directly, you can start from a file and add to that file yourself. Also, one additional note, as of v1.23 of ACE a single transaction has been added that removes the need to also call the data "pull" transaction. "DataCaptureToFile" and "DataCaptureToStore" will handle executing the capture and pulling the data.

    Regards,

    Eoin