【问题标题】:Trouble following Encrypted Big-Query tutorial document无法遵循加密的 Big-Query 教程文档
【发布时间】: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/grand­cherokee",4799.00,3950,2.4

【问题讨论】:

    标签: json google-bigquery


    【解决方案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
    • 尝试在架构文件的行尾添加逗号。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    相关资源
    最近更新 更多