首页 文章

Tableau BigQuery连接器 - SQL方言

提问于
浏览
0

在Tableau 10.1中,我尝试使用标准SQL在BigQuery中创建的视图,但似乎Tableau使用的方言是Legacy SQL,因为我一直得到相同的错误:

The Google BigQuery service was unable to compile the query.
Cannot reference a SQL view in a Legacy SQL query.

根据文档,Tableau 10.1应使用默认标准SQL:https://onlinehelp.tableau.com/current/pro/desktop/en-us/examples_googlebigquery.html

我甚至试图通过使用自定义的.tdc文件来强制使用方言,但它仍然不起作用:

<connection-customization class='bigquery' enabled='true' version='10.1' >
  <vendor name='bigquery' />
  <driver name='bigquery' />
  <customizations>
    <customization name='connection-dialect' value='simba-sql' />
  </customizations>
</connection-customization>

.tdc已加载,我可以在日志中看到(C:\ Users ... \ Documents \ My Tableau Repository \ Logs \ log.txt):

{"ts":"2017-01-10T21:41:20.122","pid":23988,"tid":"581c","sev":"info","req":"-","sess":"-","site":"{F3FB300D-09B3-4C60-94E0-EAF83FA07153}","user":"-","k":"msg","v":"Found TDC 'C:\\Users\\...\\Documents\\My Tableau Repository\\Datasources\\bigquery.tdc'."}

怎么了?

2 回答

  • 0

    您可以在BigQuery中启用标准SQL,如BigQuery SQL Reference document中所述,或使用Legacy SQL,以适合您的Tableau方言首选项 .

  • 0

    你是对的,你不能只添加#StandardSQL装饰器 .

    您需要更新您的Tableau版本 . 我试过10.1并且无法使用StandardSQL然后我安装了10.1.17并且我能够使用StandardSQL .

    您很快就会知道您安装的Tableau版本是否支持StandardSQL,因为存在“使用旧版SQL”复选框,当然您想要取消选中 .

相关问题