@takbb you made me laugh haha ha ! We are not going to quarrel about it lol ! So funny !
@Karlygash has the last word lol !
Best wishes to you all !
Ael
@takbb you made me laugh haha ha ! We are not going to quarrel about it lol ! So funny !
@Karlygash has the last word lol !
Best wishes to you all !
Ael
@takbb @ipazin @aworker thank you for you help and I really appreciate your effort
I would love to use java snippers , but my skills are not enough yet((
@takbb your solution is really great, just one node and proper, cool solution!! I agree with that when you are sharing your workflow other users might not understand it. Specially when your customer asks to load input files by themselves.
@aworker as usually you always give the best solution using KNIME nodes. Actually I haven’t used Rule Based Row Splitter yet(. It is good chance to practice using this node
Hi @Karlygash
Thanks for your compliments and glad you find these two solutions useful !
I totally agree with the pros and cons of KNIME coding versus classic coding. Having said that, it’s really amazing how sometimes, a single line of classic programming (Java, Python or RegEx) can replace a good dozen of KNIME nodes lol ! @takbb (with Java or Python) and @armingrudd (with RegEx) give us very often the opportunity to learn more, and thus save us from racking our brains the whole day haha ha ! Kudos again to them !
Have a lovely day !
Ael
Thanks, you too!
Are there any courses ?))related to knime snippers?
There is no much difference between the Java/Python/JavaScript used in the KNIME snippets compared to the one used in other environments, so classic tutorials on Java/Python/etc. from the web would be useful to start with. The only thing different you need to know is how to gather the data and how to return the results.
Most often I learn this by looking at simple examples in the KNIME forum or in the hub. One thing I really love about the KNIME web site is that is full of examples associated to every node. For instance, if you need to know how to program in Python with the Python Script node, good places to look at are the following:
You’ll find there explanations and a list of workflows as examples:
or
Be aware that some of the scripting nodes come already along with examples called templates, to illustrate how the data need be gathered and returned:
These are just some hints to start with.
Best wishes,
Ael
Thanks for your links that you provided, I started with Java, but it was a bit tough for me(( Then I moved to python) Hope that in future I can write some extra functions as you using snipper)
Thanks a lot for your help
@aworker, hello=)
I am using your solution right now, I have one question related to moving aggregation.
Is it possible to move the row within the group?
For example here in this case I have only one employee, if I add other employees, it moves down appropriately but it is taking incorrectly
Hi @Karlygash and welcome back !
I guess what you mean is that this should be done separately (independently) based on employee, so the rows for one employee should not be taken into account for the next or the previous employee ? Is that the right interpretation ?
Looking forward to helping
Ael
@aworker , yeah exactly)
sorry for my poor english)
I have in case uploaded workflow, but the most them are done by you and @takbb
emp_data.knwf (536.9 KB)
Do we have a possibility in knime like window functions in sql?
No problem at all @Karlygash (and your english is perfect )
I have downloaded the workflow and I’ll let you know when the solution is implemented.
I’ll be back soon. Hold the line please !
Best
Ael
Hi @takbb
I have just downloaded the last version of the workflow by @Karlygash and while using the last download version of KNIME (4.3.3), I’m facing this problem:
and I do not know why. I guess this is working on your side. If so, would you mind to take over from here and reply to @Karlygash question ? I believe a solution may be a “group loop” node by employee so the processing is done only based on separate employees. But may be you have a better solution in mind !
Sorry @Karlygash and @takbb for not been of help here !
Best
Ael
@aworker , oh yes, here are some updates. @takbb implemented new cool components, I installed them and that s why it s asking about updates
Component name is First and Last for Group
I do not know how to share with comments:D
Just added link =)
hi @aworker and @Karlygash
yes the workflow contains three copies of a component but clicking Yes to update (or No ) should allow it to work. However, what I’ve done now is “disconnected” the component from its reference on the hub so hopefully it won’t ask for updates any more.
Apologies for delay, but I had to catch up on the previous messages as I hadn’t been following the “moving aggregation” part of the flow, as I knew that bit was already in (more) capable hands.
However, I think I understad, that basically each time the employee name changes, we need to have the “last” values from the moving aggregation set to missing just as it is for the final row in the dataset.
Assuming I got that bit right, then that “First and Last for Group” component can come to the “rescue”. If we ask it to mark the first and last row for “Employee Name”
then what it does is populate two columns “EmployeeStart” and “EmployeeEnd”.
This then makes it super easy to use a Rule Engine to “fix” the “last” values at the end of each Employee window
Is that what is needed? I know it’s a bit of a “cheat” but this is exactly the kind of situation that component was written for
(And apologies if I’ve misunderstood what was being asked!)
emp_data_2.knwf (619.3 KB)
[Edit: re-uploaded without resetting data ]
Hi @takbb
Thanks a lot for taking over and the great explanations added to your last message (great as usual !)
I believe what you have implemented is absolutely right but @Karlygash has the last word
What do you think @Karlygash ?
Thanks again !
Take care and enjoy your weekend !
Ael
Haha ha ! Most probably !
Good weekend too !
Good Day @takbb @aworker
I really , really appreciate your help and support
From my first workflow, I have learned a lot, thanks to @takbb @aworker !
@aworker you re right, @takbb implementation is absolutely right!
Thank you again
Have a nice day and hope to see you here again))))
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.