Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems like a bug in a BigQuery join #4218

Closed
marcromeyn opened this issue Jan 24, 2017 · 7 comments
Closed

Seems like a bug in a BigQuery join #4218

marcromeyn opened this issue Jan 24, 2017 · 7 comments
Assignees
Labels
Database/BigQuery Priority:P2 Average run of the mill bug Type:Bug Product defects
Milestone

Comments

@marcromeyn
Copy link

Bug

Joins don't work for me with BigQuery as database, seems a problem with the way Metabase aliases fields and tables.

  • Your browser and the version: Chrome 52.1
  • Your operating system: OS X 10.12
  • Your databases: BigQuery
  • Metabase version: 0.21.1
  • Metabase hosting environment: AppEngine
  • Metabase internal database: MySQL

Repeatable steps to reproduce the issue

The error is as follows:
Field 'logs.table_conversations__via__conv.agent_id' not found on either side of the JOIN

The SQL-query Metabase creates is:

SELECT
  [logs.table_conversations__via__conv.agent_id] AS [logs.table_conversations__via__conv.agent_id]
FROM
  [logs.table_chatuser_events]
LEFT JOIN
  [logs.table_conversations] [table_conversations__via__conv]
ON
  [logs.table_chatuser_events.conversation_id] = [table_conversations__via__conv.id]
GROUP BY
  [logs.table_conversations__via__conv.agent_id]
ORDER BY
  [logs.table_conversations__via__conv.agent_id] ASC
LIMIT
  2000

It should be this (add the dataset to table you join with):

SELECT
  [logs.table_conversations__via__conv.created_by] AS [logs.table_conversations__via__conv.created_by]
FROM
  [logs.table_chatuser_events]
LEFT JOIN
  [logs.table_conversations] [logs.table_conversations__via__conv]
ON
  [logs.table_chatuser_events.conversation_id] = [logs.table_conversations__via__conv.id]
GROUP BY
  [logs.table_conversations__via__conv.created_by]
ORDER BY
  [logs.table_conversations__via__conv.created_by] ASC
LIMIT
  2000

Should be a very straightforward fix.

@asafeilam
Copy link

I also experienced the same problem.
what to do?

@MiBaDK
Copy link

MiBaDK commented Apr 24, 2017

Hi guys, any plans for this one?

@MiBaDK
Copy link

MiBaDK commented Jun 14, 2017

Having dreams about one day waking up and seeing a patch for this one or at least assigned a milestone. That would be a great day :)

@MiBaDK
Copy link

MiBaDK commented Jun 22, 2017

@MiBaDK
Copy link

MiBaDK commented Oct 16, 2017

Hi, a proposed fix has been committed some time ago. Any chance of getting this in a release soon :)

@vcGomez
Copy link

vcGomez commented Nov 28, 2017

I also would like to know about this issue :)

@vbronsky
Copy link

vbronsky commented Dec 15, 2017

Any news about this issue with BQ joins in custom question? Any chance to add this fix to release?

I'm still have an error:

Field 'METABASE_DATA.SKU__via__SKU_code.Trade_group_in_price_model' not found on either side of the JOIN

@camsaul camsaul self-assigned this Dec 20, 2017
@camsaul camsaul added the Type:Bug Product defects label Dec 20, 2017
@camsaul camsaul added this to the 0.28 milestone Dec 20, 2017
@salsakran salsakran added the Priority:P2 Average run of the mill bug label Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database/BigQuery Priority:P2 Average run of the mill bug Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

8 participants