Forum Discussion

NidhiMangtani's avatar
NidhiMangtani
Contributor III
2 years ago

Cube Data Audit Report

Hi All,

Has anyone built a custom audit data report for their OneStream planning applications which shows which users changed which entities/accounts/scenarios, etc on specific days?

Not sure if we have a marketplace solution for this.

Any leads will be helpful.

Thanks,

Nidhi Mangtani

  • JackLacava's avatar
    JackLacava
    2 years ago

    That report is backed by the WF_DataEntry_Detail_RPTA adapter, which is one big sql query. That query is user-agnostic (I guess the report does some extra filtering later, restricting results to your own changes), it will give you all changes; you can have a look at the WHERE clause and modify it to point to the records you want.

    You can then retrieve the IDs of users referenced in an audit from the table AuditSecUser, in the Framework database, like the adapter WF_DataEntryUserInfo adapter does:

    SELECT UniqueID, Name
    From AuditSecUser 
    GROUP BY Name, AuditSecUser.UniqueID

    The UniqueID values listed there are the ones that appear in audit tables. (Tbh, at a glance, they seem to be the same IDs used in the SecUser table in Framework, but maybe things change with time, so I'd stick to AuditSecUser.)

    Of course you won't be able to join these IDs in one big SQL, since audit tables are in the Application database and user IDs are in the Framework one. The logic should probably be:

    1. retrieve all changes from audit tables that you're interested in, regardless of user. I'd copy the query in WF_DataEntry_Detail_RPTA for that and tweak it, but you already have something.
    2. from those records, extract the user IDs and query AuditSecUser to get readable details, with a query like SELECT UniqueID, Name, Email From AuditSecUser where UniqueId in ('myId1', 'myId2', 'myId3')
    3. blend the two datasets together. This looks to me like a job for Dashboard DataSets, very similar to a recent blog post...

    Am I missing anything...?

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Welcome back!

    In Standard Application Reports (solution available in Marketplace, that typically is installed in every app), I see we have a bunch of reports related to auditing changes:

    When I dig a bit more in the "XFS Application Reports (RPTA)" Dashboard Maintenance Unit that produces those reports, I can see that there are a bunch of Data Adapters running rules:

    You could grab those rules and adapters and customize them, or just call them from your own Dashboard DataSet rule with BRApi.Dashboards.Process.GetAdoDataSetForAdapter and then filter or customize the output further.

    Hope that helps!

    • NidhiMangtani's avatar
      NidhiMangtani
      Contributor III

      Hi Jack,

      Thanks for your response. We are looking for data audit, not component audit.

      Could fetch which entity, which account, etc have changed from DataEntryAuditCell and DataEntryAuditSource. Not sure how to pull user information from here not able to trace where this UserID maps to in the framework tables. 

      If we pull details from TaskActivity alone, we get the user details but not the data unit details.

      Getting both in one view has been a blocker.

      Thanks,

      NIdhi Mangtani

       

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        The user IDs in audit tables are from AuditSecUser. I got that by examining the adapters associated with the Data Entry Detail report, which I found by using the dashboard in Design Mode 😀