perl trigger script to process dataset data

LabKey Support Forum (Inactive)
perl trigger script to process dataset data WayneH  2017-10-03 12:25
Status: Closed
 
Hello,

I'm hoping you can help me better understand and I hope I ask the question clearly. I'm not getting this.
We have existing data in a data set that we want to process via a perl trigger script. We want this script to read data from one dataset whenever new rows are added and populate results in another dataset. The documentation that you provide indicates that a javascript file needs to be added to the appropriate folder to run a trigger script (in this case I believe that would be 'MODULE_NAME/queries/study/QUERY_NAME.js'). But would this require root access to drop this file into the folder or can this be done by an alternate method, or via the web interface. Is there a solution using the pipeline module or some other means to accomplish this task?

It's not clear to me at all how this can work so hoping you can inform me.

Thanks,

Wayne H
 
 
Jon (LabKey DevOps) responded:  2017-10-05 21:18
Hi Wayne,

I'm not sure I understand the question. Triggers scripts would have to be built within a module, so yes, you would have to have access to the server in order to place your module that contains the trigger script in the modules directory of the Labkey installation.

This is why our docs here on trigger scripts talk about modules so much:

https://www.labkey.org/Documentation/wiki-page.view?name=serverSideValidation

Trigger scripts are the only thing that can detect changes to tables in order to then trigger a script to then run an API call to perform some kind of action, such as updating values in a certain row or even writing to another table.

Regards,

Jon
 
WayneH responded:  2017-10-05 21:34
Ahhh.. I see.
Point well taken..

My initial understanding was that we needed to create a module but then I got confused about how we drop in a required perl script as all of the examples include javascript.
I'm working with the developer and wanted to have better insight as to how to accomplish the task.

No doubt looking at the testtriggers and simpletest modules provide good examples...

Thanks.

W