Tracardi / tracardi

TRACARDI is a new HOME for your customer data. TRACARDI is an Composable API-first solution for any company that need inexpensive CDP to intergrate with.
https://www.tracardi.com
Other
519 stars 95 forks source link

Plugin that checks if two arrays are different. #765

Closed atompie closed 1 month ago

atompie commented 2 years ago

Is your feature request related to a problem? Please describe. Plugin that checks if two arrays are different.. This plugin is very simple in terms of python. The challenge is to add it as plugin. This is also very simple if you read this http://docs.tracardi.com/plugins/tutorial/part1/ and http://docs.tracardi.com/plugins/tutorial/part2

Describe the solution you'd like User defines in plugin configuration what two arrays should be compared. Both arrays must be referenced by dot-notation.

Example of configuration

{
   "array1": "event@properties.array1",
   "array2": "event@properties.array2",
}

Input: Workflow payload

Output: If the arrays are the same returns the payload on True port if not returns an the difference between arrays.

A = [10, 20, 30, 40, 80]
 B = [100, 30, 80, 40, 60]

set(A) - set(B) = {10, 20}
set(B) - set(A) = {100, 60}

Additional context You will need to setup the dev environment. Here is the tutorial how to do it. Also to understand how the plugins work please read http://docs.tracardi.com/plugins/tutorial/part1/ and http://docs.tracardi.com/plugins/tutorial/part2/ . The next part is o its way so you can extend your knowledge about Tracardi plugins.

atompie commented 2 years ago

@patromi would you like to do this plug-in ?

patromi commented 2 years ago

@atompie Sure :)

ddninja commented 1 year ago

hi @atompie I would like to work on this issue, can you please assign this to me?

shahad1307 commented 11 months ago

@atompie Hello I'm a student in CMU and I have a project. I'm interested in working on this issue. Looks doable could do assign me?

atompie commented 11 months ago

@shahad1307 Sure assigned. Please work on branch 0.8.2-dev

atompie commented 11 months ago

@shahad1307 Please work on branch 0.8.2-dev and this may help to speed up the development: https://www.youtube.com/watch?v=R_kr9mBAKAU