You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by "EricTonissen (via GitHub)" <gi...@apache.org> on 2026/02/11 14:35:39 UTC
[D] Best way to set hop variables (hop)
GitHub user EricTonissen created a discussion: Best way to set hop variables
Within Pentaho I use .kettle/kettle.properties to set the : carte_server_name=etl01-kettle01. This way I could use ${carte_server_name} where I needed this variable. ChatGPT told me that HOP some similar possibility to set this variable.
First tried **.hop/hop.properties** and second was within the **json config file belonging to the --project parameter**.
But both ways didn't work.
How can I solve this?
Btw I have some extra variables defined in here, so the "name" from the hop-server xml file is not enough
GitHub link: https://github.com/apache/hop/discussions/6555
----
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] Best way to set hop variables (hop)
Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: Best way to set hop variables
The best way would be to use an environment. How to set and use variables is explained on [this page](https://hop.apache.org//manual/latest/variables.html#_how_can_i_define_variables)
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15781004
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
I am not able to find an solution. Maybe some more context.
I have several hop-servers running on 1 host. The only difference must be a name of the hop server.
I tried starting the hop-server.sh with -s or --system-properties, but that doesn't ends up in the hop-server.
Added System.println in the code HopServer.java, but the output stayed null.
public void applySystemProperties() {
// Set some System properties if there were any
System.out.println("System properties:" + systemProperties);
I can add <name> in the server-config.xml, but I'am not able to read this parameter in my pipelines.
I could not find that I can add extra variables in the server-config.xml file.
I can add the name in the project xml file and put --project as parameter to hop-server.sh,
but that means that I need to define for each hop-sever his own project.
I didn't found that I have the possibility to pass a environment xml file to the hop-server.
Is there some solution, which I missed?
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15846445
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen edited a discussion: Best way to set hop variables
Within Pentaho I use **.kettle/kettle.properties** to set the : **carte_server_name=etl01-kettle01**. This way I could use **${carte_server_name}** where I needed this variable. ChatGPT told me that HOP have some similar possibility to set this variable.
First tried **.hop/hop.properties** and second was within the **json config file belonging to the --project parameter**.
But both ways didn't work.
How can I solve this?
Btw I have some extra variables defined in here, so the "name" from the hop-server xml file is not enough
GitHub link: https://github.com/apache/hop/discussions/6555
----
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] Best way to set hop variables (hop)
Posted by "marvinhorst (via GitHub)" <gi...@apache.org>.
GitHub user marvinhorst edited a comment on the discussion: Best way to set hop variables
As Hans mentioned the best place to store variables are in an environment. I would get the workflow or pipeline working from the command line via hop-run first. After it's working properly there then follow the instructions for setting up hop-server.
Some additional comments at https://github.com/apache/hop/discussions/6264 regarding hop-server setup may help.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15854445
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen edited a comment on the discussion: Best way to set hop variables
I am not able to find an solution. Maybe some more context.
I have several hop-servers running on 1 host. The only difference must be a name of the hop server.
I tried starting the hop-server.sh with -s or --system-properties, but that doesn't ends up in the hop-server.
Added System.println in the code HopServer.java, but the output stayed null.
public void applySystemProperties() {
// Set some System properties if there were any
System.out.println("System properties:" + systemProperties);
I can add < name > in the server-config.xml, but I'am not able to read this parameter in my pipelines.
I could not find that I can add extra variables in the server-config.xml file.
I can add the name in the project xml file and put --project as parameter to hop-server.sh,
but that means that I need to define for each hop-sever his own project.
I didn't found that I have the possibility to pass a environment xml file to the hop-server.
Is there some solution, which I missed?
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15846445
----
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] Best way to set hop variables (hop)
Posted by "marvinhorst (via GitHub)" <gi...@apache.org>.
GitHub user marvinhorst edited a comment on the discussion: Best way to set hop variables
I'll have to try that new method. Looks like it has the added bonus of being able to pass in some user supplied parameters should the need arise.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15860195
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
Got this working. thnx.
Have to change the hop pipelines for that, but this are not that many.
Most of the work is that in Pentaho I used to write direct to the getServletPrintWriter() in all unhappy flows.
And now I have to redirect this flow to 1 transform.
The disadvantage I see of the HOP implementation is, that it is possible to change also the variables and not only the parameters defined in the Pipeline tab.
And I'm missing the possibility to define that I want <CR/LF> between the rows.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15871555
----
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] Best way to set hop variables (hop)
Posted by "bamaer (via GitHub)" <gi...@apache.org>.
GitHub user bamaer added a comment to the discussion: Best way to set hop variables
You can set variables on (at least) the hop, project and environment levels.
Both the "where I needed this variable" and "didn't work" in your question don't give us very much to work with. Can you be more specific about where you need this variable and in what sense it didn't work?
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15771769
----
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] Best way to set hop variables (hop)
Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: Best way to set hop variables
There is an example in the documentation https://hop.apache.org//manual/latest/hop-server/web-service.html each webservice has its own endpoint making it clear to the users what to expect.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15863596
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
You can add user supplied parameters, but the 'Output to servlet' is not working.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15861893
----
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] Best way to set hop variables (hop)
Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: Best way to set hop variables
Output to servlet has been replaced with Web Service functionality, those ui elements still have to be removed
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15862254
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
Sorry, I needed the variable within a pipeline.
<img width="594" height="436" alt="image" src="https://github.com/user-attachments/assets/50afb0ed-30e5-44f2-818a-e774a72bdca2" />
After this transformation, the carte_server_name stays ${carte_server_name}
<img width="583" height="55" alt="image" src="https://github.com/user-attachments/assets/8ae132ae-9f1e-4abd-a7db-1733456efdc0" />
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15780773
----
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] Best way to set hop variables (hop)
Posted by "marvinhorst (via GitHub)" <gi...@apache.org>.
GitHub user marvinhorst added a comment to the discussion: Best way to set hop variables
As Hans mentioned the best place to store variables are in an environment. I would get the workflow or pipeline working from the command line via hop-run first. After it's working properly there then follow the instructions for setting up hop-server.
Some additional comments [https://github.com/apache/hop/discussions/6264](url) here regarding hop-server setup may help.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15854445
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
@marvinhorst The problem you solved could also be solved using the new possibilty using execWorkflow or execPipeline to start workflows/pipelines without registering.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15858984
----
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] Best way to set hop variables (hop)
Posted by "marvinhorst (via GitHub)" <gi...@apache.org>.
GitHub user marvinhorst added a comment to the discussion: Best way to set hop variables
I'll have to try that new method. Looks like it has the added bonus of being able to pass in some user supplied variables should the need arise.
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15860195
----
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] Best way to set hop variables (hop)
Posted by "EricTonissen (via GitHub)" <gi...@apache.org>.
GitHub user EricTonissen added a comment to the discussion: Best way to set hop variables
Can you please explain how. I certain need this. I use execPipeline to start a pipeline. This works. But how can I give a response on the request? Do you have an example?
GitHub link: https://github.com/apache/hop/discussions/6555#discussioncomment-15863542
----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org