【问题标题】:Can I run a query, using BQ command line tool, from a file in Windows command prompt?我可以使用 BQ 命令行工具从 Windows 命令提示符中的文件运行查询吗?
【发布时间】:2017-03-30 19:07:32
【问题描述】:

我看到this 的问题,但给出的答案仅适用于 Linux/Mac。我知道这在 Powershell 中有效。有没有办法在 Windows 上使用命令提示符来做同样的事情?

【问题讨论】:

    标签: google-bigquery command-prompt


    【解决方案1】:

    尝试如下

    C:\Program Files (x86)\Google\Cloud SDK>echo SELECT 'Hello' > qq.txt
    
    C:\Program Files (x86)\Google\Cloud SDK>bq query < qq.txt
    Waiting on bqjob_r56213d80_0000015b20a3b653_1 ... (0s) Current status: DONE
    +-------+
    |  f0_  |
    +-------+
    | Hello |
    +-------+
    
    C:\Program Files (x86)\Google\Cloud SDK>   
    

    这是在 Win 上的 Google Cloud SDK Shell 中运行的

    【讨论】:

      猜你喜欢
      • 2011-11-18
      • 2016-01-30
      • 2017-01-27
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多