JSON 尝试在 Google BigQuery CLI 中创建 transfer_config 时出错

JSON Errors when trying to create a transfer_config in Google BigQuery CLI

我正尝试在 windows 命令行上使用

创建传输作业
bq mk --transfer_config --data_source=amazon_s3 
--target_dataset=Usage --display_name='s3_transfer_installs_global_in_v0_test' 
--params='{"data_path_template":"mybucket", "destination_table_name_template":"in_table", "file_format":"CSV", "max_bad_records":"0", "skip_leading_rows":"1", "allow_jagged_rows":"false", "allow_quoted_newlines":"true", "access_key_id":"dfadfadf",  "secret_access_key":"sdfsfsdfsdf"}' 

但我不断收到错误的变体

Too many positional args, still have ['"allow_quoted_newlines":"true","access_key_id":',...

--apilog 的输出也没有启发性。

我的 JSON 已通过验证,但可能仍需要转义字符?

非常感谢任何帮助,现在已经围绕引号和反斜杠改组了两个小时...

我在 运行查询您的查询时遇到了与您相同的错误。

我尝试在 --params 选项中用单引号替换双引号,它似乎有效。请尝试以下操作:

bq mk --transfer_config --data_source=amazon_s3 --target_dataset=Usage --display_name='s3_transfer_installs_global_in_v0_test' --params="{'data_path_template':'mybucket', 'destination_table_name_template':'in_table', 'file_format':'CSV', 'max_bad_records':'0', 'skip_leading_rows':'1', 'allow_jagged_rows':'false', 'allow_quoted_newlines':'true', 'access_key_id':'dfadfadf',  'secret_access_key':'sdfsfsdfsdf'}"

我还尝试 运行 Windows PowerShell 中的原始命令,它在没有任何更改的情况下工作。

我认为问题出在 Windows cmd...