JSON Object Diff
Is there a way to easily show what key values do not match between two JSON objects? If I have two objects with the same keys, can I output just the keys and values that do not match between the two objects? I am looking for a way to do this without having to create an equality expression for each key.7.3KViews0likes10CommentsHow does a Diff snap determine modified vs inserted?
I’m currently using a Diff snap as part of a pipeline that inserts data into a SQL server for reporting purposes. I’m using a diff snap so that I can determine if a record needs to be updated or inserted, the problem I’m having is that 2 of the records I would expect to be coming through as modified records are showing up as New instead, which is causing a primary key error when I hit the insert snap. I thought that the record I set as the sort path as acting as a key for determining if the record was new or not, but now I’m not sure that’s the case. Would anyone be able to explain to me what could be going on and how I might be able to resolve it? Ideally I’d like the diff snap to only be looking at the ID column to decide if a record is new or not.3.1KViews0likes3Comments"Sort path" based on dynamic columns // sort & diff
Hi, i’m having the following challenge: I’m pulling data from a REST API as well as SQL tables. Before grabbing the actual objects, i’m grabbing “Object Types” from the REST API to know which tables to grab from the SQL DB. The tables each have different columns, however what i want to achieve is to compare the data i retrieved from the REST API and the Data from the SQL Table through a DIFF. Now the challenge here is that the Sort Path doesn’t allow me to use expressions, with which this would be fairly easy, however I’m somewhat stuck on the matter of how to tell the diff which columns to sort on since i don’t know beforehand which ones will be coming along. I thought i could pass a parameter through a pipeline execute with the path to sort on, however since the DIFF won’t accept it, this will likely not be an option. As you can see i want the pipe to be fairly generic and i’m not particularly eager creating 6 different pipes for each table. Does anyone have a suggestion on how to tackle a situation such as this? Trigger Pipe (getting the object types, then calling the child pipe with the individual object Types): Getting the objects and compares them: Thanks and best regards Thomas2.7KViews0likes2CommentsMandatory Diff Snap Outputs
What is the reasoning for changing the Diff snap to require all 4 outputs? And what’s the best way to ignore the outputs you don’t want when creating a child pipeline and you need to “plug up” those outputs? I assume union them together and input them into what? Thanks in advance!3.7KViews1like8CommentsDiff snap "modified" output
Small question about the output from the Diff snap. From the documentation it’s the output of most are fairly clear: Insertion = The row from New that isn’t in Original Deletion = The row from Original that isn’t in New Modified = The rows from Original and New that are the same, but modified in some way Unmodified = All rows that are in both Original and New The issue is number 3. I’ve tried this with sample data and have a few questions: I get two documents output in modified, but how do I know that any given rows are from a single comparison (assuming many comparisons will go through the same diff snap in a short space of time)? How can I tell which document corresponds to which input? That is to say, how can I tell if any given document output is from the Original or the New input?2.8KViews0likes1Comment