无法遵循加密的 Big-Query 教程文档
Posted
技术标签:
【中文标题】无法遵循加密的 Big-Query 教程文档【英文标题】:Trouble following Encrypted Big-Query tutorial document 【发布时间】:2014-08-25 15:28:14 【问题描述】:我想试试google大查询的加密大查询客户端,遇到了一些麻烦。
我正在按照此 PDF 中的说明进行操作:
https://docs.google.com/file/d/0B-WB8hYCrhZ6cmxfWFpBci1lOVE/edit
我到了运行这个命令的地方:
ebq load --master_key_filename="key_file" testdataset.cars cars.csv cars.schema
我得到一个错误字符串,它以:
结尾raise ValueError("No JSON object could be decoded")
我为我的 .csv 和 .schema 文件尝试了几种不同的格式,但都没有奏效。这是我的最新版本。
cars.schema:
["name": "Year", "type": "integer", "mode": "required", "encrypt": "none"
"name": "Make", "type": "string", "mode": "required", "encrypt": "pseudonym"
"name": "Model", "type": "string", "mode": "required", "encrypt": "probabilistic_searchwords"
"name": "Description", "type": "string", "mode": "nullable", "encrypt": "searchwords"
"name": "Website", "type": "string", "mode": "nullable", "encrypt": "searchwords","searchwords_separator": "/"
"name": "Price", "type": "float", "mode": "required", "encrypt": "probabilistic"
"name": "Invoice_Price", "type": "integer", "mode": "required", "encrypt": "homomorphic"
"name": "Holdback_Percentage", "type": "float", "mode": "required", "encrypt":"homomorphic"]
汽车.csv:
1997,Ford,E350, "ac\xc4a\x87, abs, moon","www.ford.com",3000.00,2000,1.2
1999,Chevy,"Venture ""Extended Edition""","","www.cheverolet.com",4900.00,3800,2.3
1999,Chevy,"Venture ""Extended Edition, Very Large""","","www.chevrolet.com",5000.00,4300,1.9
1996,Jeep,Grand Cherokee,"MUST SELL! air, moon roof,loaded","www.chrysler.com/jeep/grandcherokee",4799.00,3950,2.4
【问题讨论】:
【参考方案1】:我认为问题可能是您需要将 --master_key_filename
参数移到 load
参数之前。如果这不起作用,您可以发送添加--apilog=-
作为第一个参数的输出吗?
另外,这里有一个运行 ebq 的示例脚本文件: https://code.google.com/p/bigquery-e2e/source/browse/#git%2Fsamples%2Fch13
【讨论】:
不幸的是,移动 --master_key_filename 参数不起作用。当我将 --apilog 标志添加到同一命令的开头时,我收到此消息:FATAL Command testdataset.cars unknown 尝试在架构文件的行尾添加逗号。以上是关于无法遵循加密的 Big-Query 教程文档的主要内容,如果未能解决你的问题,请参考以下文章
7 天用户计数:Big-Query 自加入以获取日期范围和计数?