Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
kevinrlewis
Contributor II
Contributor II

Generic dockerfile with --context-param switch that contains spaces

In regards to this post: Generic Dockerfile with Talend

 

I'm curious if there is a way to have a context variable that contains spaces. Currently with that dockerfile, running a job with a context and specifying "hello world" as that context and printing that context in the job will print "hello. Is there a way to configure the dockerfile or the job to allow context variables with spaces?

 

Thank you.

Labels (2)
5 Replies
vapukov
Master II
Master II

Hi,

 

sorry, it is not clear - do you want context variable name with space (no) or context variable value with space(yes)?

Anonymous
Not applicable

Hi,

 

    I have tried the normal use case depicted in Mike's article and it was working fine. But I have not tried passing parameters with spaces.

 

    But when I checked some links, other docker users have overcome  the issue by passing as an array.

 

https://stackoverflow.com/questions/47179199/how-to-pass-arguments-with-space-by-environment-variabl...

 

    Could you please try solution mentioned in above example and let us know whether you were able to resolve it?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

kevinrlewis
Contributor II
Contributor II
Author

Sorry for the confusion. Context variable value with space.

kevinrlewis
Contributor II
Contributor II
Author

@nthampi I will try the solution in that post and get back to you. Thank you!

kevinrlewis
Contributor II
Contributor II
Author

@nthampi I tried doing it that way locally but that solution doesn't work which I believe is because of the nested strings within the command. My main goal is to give the context values to a task definition. Example:

{
  "networkMode": "none",
  "containerDefinitions": [
    {
      "memory": 1024,
      "name": "testPrint",
      "image": "talend:testPrint-latest",
      "cpu": 1024
    },
    {
      "environment":
      [
          {
              "name": "ARGS",
              "value": "--context_param test=\"howdy from context\""
          }
      ]
    }
  ],
  "family": "talend-testPrint"
}

Where the environment contains the context variables within the ARGS value. So multiple "--context_param" equals multiple context variables/values. I'm thinking based on your previous answer if I could put an array in the value field or something similar.