我正在使用aws cli获取仅包含一个特定HITTypeId的HITId的表。
查询:
aws mturk list-hits --output table --query 'HITs[].{"1. HITId": HITId, "2. Title": Title, "3. Status":HITStatus, "4. HITTypeID": HITTypeId}' --hit-type-id "ABCD" --endpoint-url https://mturk-requester-sandbox.us-east-1.amazonaws.com --max-results 100
输出:
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --hit-type-id, ABCD
AWS CLI的新手,如何解决这个问题?
此外,我尝试了:
aws mturk list-hits --output table --query 'HITs[?HITTypeId='ABCD'].{"1. HITId": HITId, "2. Title": Title, "3. Status":HITStatus, "4. HITTypeID": HITTypeId}' --endpoint-url https://mturk-requester-sandbox.us-east-1.amazonaws.com --max-results 100
这当然给了我一个语法错误(试图将其与表上的查询相关联。
参考:https://blog.mturk.com/tutorial-managing-mturk-hits-with-the-aws-command-line-interface-56eaabb7fd4c
==
用于相等,您正在使用?HITTypeId='ABCD'
尝试以下命令:
aws mturk list-hits --output table --query 'HITs[?HITTypeId==`ABCD`].{"1. HITId": HITId, "2. Title": Title, "3. Status":HITStatus, "4. HITTypeID": HITTypeId}' --endpoint-url https://mturk-requester-sandbox.us-east-1.amazonaws.com --max-results 100