You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by "ossDataEngineer (via GitHub)" <gi...@apache.org> on 2025/02/18 19:23:47 UTC

[D] Support for Python scripting action in hop workflow (hop)

GitHub user ossDataEngineer created a discussion: Support for Python scripting action in hop workflow

Hello Apache Hop Team,

**Context:** 
Currently Hop Workflow supports addition of scripting actions like SQL, Javascript, etc.
Currently Hop Pipeline supports addition of scripting transforms with ability to choose engines like ECMAScript, Python, Groovy, etc.

**New Idea:**
1. Can we add support for Python scripting action so that it becomes convenient to write custom logic in Hop Workflow?
2. Can we standardize the scripting action like scripting transform with ability to configure engines depending on type of scripting language?

Thanks,
Apache Hop Newbie

GitHub link: https://github.com/apache/hop/discussions/4922

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Support for Python scripting action in hop workflow (hop)

Posted by "rvirgolireply (via GitHub)" <gi...@apache.org>.
GitHub user rvirgolireply added a comment to the discussion: Support for Python scripting action in hop workflow

Hello @hansva,
I have a use case that is similar to @ossDataEngineer 's one.
Another one is:
1. in a workflow, extract some data from a table
2. process it using the hop-cpython plugin, so that it generates a properly formatted HTML body and save it in a variable
3. use the variable in the body of the Mail action
As I said, I currently use the hop-cpython plugin v2.4, which hasn't been developed for quite a while now.

Thanks!

GitHub link: https://github.com/apache/hop/discussions/4922#discussioncomment-12336874

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Support for Python scripting action in hop workflow (hop)

Posted by "rvirgolireply (via GitHub)" <gi...@apache.org>.
GitHub user rvirgolireply added a comment to the discussion: Support for Python scripting action in hop workflow

@liosc Hey! Didn't know about that transform, I'll take a look at it as soon as possible! Thanks!

GitHub link: https://github.com/apache/hop/discussions/4922#discussioncomment-12399835

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Support for Python scripting action in hop workflow (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: Support for Python scripting action in hop workflow

It should be possible to include these scripting languages in a workflow too, that being said. I always feel that scripts should be some form of last resort. The scripting actions and transforms are also considered a security risk in many locations and thus removed. 

So my question would be, what conditionals are we missing in workflows that makes you grab to a script?

Our main goal should be to create data pipelines without having to write code.

GitHub link: https://github.com/apache/hop/discussions/4922#discussioncomment-12241481

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Support for Python scripting action in hop workflow (hop)

Posted by "liosc (via GitHub)" <gi...@apache.org>.
GitHub user liosc added a comment to the discussion: Support for Python scripting action in hop workflow

Hi @rvirgolireply, did you consider using the "Token replacement" transform instead of doing all the HTML work with Python?

GitHub link: https://github.com/apache/hop/discussions/4922#discussioncomment-12337078

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Support for Python scripting action in hop workflow (hop)

Posted by "ossDataEngineer (via GitHub)" <gi...@apache.org>.
GitHub user ossDataEngineer added a comment to the discussion: Support for Python scripting action in hop workflow

Hello @hansva ,

Thanks for your response and tips regarding minimizing the use of scripting. Will keep that in mind.

I have a usecase where I need to
1. Reference the environment variables in workflow
2. Use those variables, perform some business logic to compute new variables (I wish to write this logic using Python)
3. Send these newly computed variables to child pipelines

GitHub link: https://github.com/apache/hop/discussions/4922#discussioncomment-12255794

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org