aws-cli
aws-cli copied to clipboard
Error parsing parameter '--steps': Expected: ',', received: '"' for input:
Describe the bug
Error parsing parameter '--steps': Expected: ',', received: '"' for input:
Expected Behavior
--steps "Type=SPARK,Name=SparkSubmit,ActionOnFailure=TERMINATE_CLUSTER,Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = '2022-08-01' LIMIT 10]"
Current Behavior
working
Reproduction Steps
I will make pr
Possible Solution
parsing rule escape
Additional Information/Context
No response
CLI version used
aws-cli/1.22.97
Environment details (OS name and version, etc.)
Python/3.9.13 Darwin/21.3.0 botocore/1.24.42
Hi @seunggabi,
Thanks for writing. It seems like you've solved your issue.
I see the PR you've added. Could you provide some more details on why this is a useful example? Is there a link to the EMR documentation that describes this feature?
Second, is the test case you're adding not covered by existing tests?
Thanks!
@kdaily Right, my issue is solved. I want to suggest documentation.
try 1st: not working (normal)
Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = '2022-01-01' LIMIT 10]
try 2nd: not working (escape 1)
Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = \'2022-01-01\' LIMIT 10]
try 3rd: not working (escape 2)
Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = \\'2022-01-01\\' LIMIT 10]
try 4th: not working (stackoverflow https://stackoverflow.com/questions/57510665/single-quotes-converting-to-special-characters-using-aws-cli)
Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = \u20192022-01-01\u2019 LIMIT 10]
try 5th: not working (https://github.com/aws/aws-cli/blob/develop/awscli/shorthand.py#L323)
Args=[--class,SparkSubmit,s3://jar/batch.jar,SELECT * FROM prod.log WHERE date = \x272022-01-01\x27 LIMIT 10]
try 6th: it's works!!!
Args=[--class,SparkSubmit,s3://jar/batch.jar,"SELECT * FROM prod.log WHERE date = '2022-01-01' LIMIT 10"]
origin test code: don't have "'aaa'. 'bbb'" this case (combine "
with '
) ,
so I suggest this pr (docs & example).
@kdaily please check!
if you don't want this pr. close issue & pr.
I am ok!
Hi @seunggabi! Thanks for your note. I commented on the PR, but will state here too. We'll pass this along to the service team doc writer who can determine if this is the right way to document the difficulty you had with getting a successful command. I converted the PR to a draft for now, but if we get feedback from them to move forward we'll have your contribution ready.
Thanks for your patience — it looks like this fell off of our radar. Linking relevant documentation page and examples code for aws emr create-cluster
.
I'm unclear on specifically what you tried to run and how you encountered that error. In your PR (https://github.com/aws/aws-cli/pull/7204/files) you added an example but didn't edit any existing example for create-cluster
. Can you explain more about what issue you ran into and what you were trying to show in the example you added?
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.