Classic file types are no longer available for use as of January 2021. You can transition your classic files or download a PDF. Learn More

What is the most straightforward way to detect changes/differences in datasets within Workiva?

Con risposta
0

Commenti

2 commenti

  • Jeff Hickey

    Hi Andrew. There isn't a built in diff within a Wdata Table. You could build this logic into your Chain though. Along the lines you mentioned in your post, here is a potential solution (I have not tested this so please thoroughly test if you choose a route similar to this).

    Your data could be loaded into a Wdata Table and the datasets saved with names indicating the time period of the data within such as March2024.csv, April2024.csv, etc. Your Chain would then run a Query to retrieve all data from the Wdata Table that was previously loaded in with the filename = April2024.csv. It would also pull current data from the source system for April2024.csv. This would mean that the Chain has access to both the current data from the source system and historical data previously loaded into the Wdata Table for April2024 period. Next, using a Tabular Transformation Advanced Query Command, bring in both datasets as tables A and B then run a query to find the rows that exist in table A but not in table B, and vice versa. That query may look something like the following (this is only an example query):

    SELECT *
    FROM   (SELECT *
            FROM   A
            EXCEPT
            SELECT *
            FROM   B)
    UNION ALL
    (SELECT *
     FROM   B
     EXCEPT
     SELECT *
     FROM   A)

    You could use a Conditional node and branch off your Chain logic as needed based on the results of the query. If the result is empty, it means that the data in table A and table B is the same and you could exit. If there are rows in the result set, it means that there are differences between the two tables. In this case, handling your flagging of the differences and replace the old dataset with the new dataset in the Wdata Table.

    1
  • Andrew McKenzie

    Great and thanks for the input Jeff Hickey! That both answers my question and gives me some additional ideas of how to approach the problem.

    0

Accedi per aggiungere un commento.