I have a run.sh script that is executing a java maven application, so it is passing some parameters the app needs, one of the parameters is a json string (dynamicOptionsJson is the param), but when I try to use this on the app I noticed some errors, checking the value of the String that I pass it prints as {bigqueryTable: table, dummyOption: hehexd}
notice it is missing the double quotes of a properly formated json String, but I believe it is getting removed by the bash, please check the .env and run.sh I have:
run.sh:
#!/bin/bash
source ./.env
mvn clean compile exec:java -P dataflow-runner -Dexec.args=" --project=${project}
--runner=DataflowRunner
--region=${region}
--gcpTempLocation=${gcpTempLocation}
--tempLocation=${tempLocation}
--serviceAccount=${serviceAccount}
--dynamicOptionsJson="${dynamicOptionsJson}"
"
in my .env I have the following:
project=project-name
region=the-region
serviceAccount=an-account
gcpTempLocation=gs://cloud_storage_bucket/temp
tempLocation=gs://cloud_storage_bucket/temp
dynamicOptionsJson='{"bigqueryTable": "table", "dummyOption": "hehexd"}'
#dynamicOptionsJson="{"bigqueryTable": "table", "dummyOption": "hehexd"}"
tried to pass the dynamicOptionsJson those ways and no success, it always removes the double quotes so I end up with: {bigqueryTable: table, dummyOption: hehexd}
any idea how can I manage to properly preserve the double quotes? Thanks