Hello everyone, I am trying to use PostgresExecut...
# ask-community
n
Hello everyone, I am trying to use PostgresExecute from the Task Library, but passing the user as a Parameter. The problem is that you can only pass the user when instantiating the task outside the flow object. I have tried to make it work by using .run() in the parameter and creating the task inside the Flow, but I don't know if this is the best way. Is there a better way to do it?
k
Hey @Nacho Rodriguez, you are right. Check this issue. In general, we are moving to having everything configurable by run (and some tasks have been edited already). This is something we’d appreciate contributions for also btw. But to fix this, you can subclass the current PostgresExecute task and replace the run method with one that accepts all of the arguments.
You would implement something like this . I can help with that if you have issues.
n
Okey than you for your help! It looks like an easy fix in the source code (Just duplicating the init params in the run() method definition?). I have never contributed to an open source project, how could I suggest a fix for this?
k
Exactly yeah. We have instructions for that here and I can help you put it together when you have something. In general, 1. Fork the repo 2. Create your branch 3. Apply your changes 4. Run the tests 5. Open a Pull Request Look at the MySQL task for a guide how to do this.
👀 1
You can also see the PR that changed the MySQL Task here . It had the same problem.