KNOWLEDGE BASE

Error "Internal error: IDB-1000: 'TABLE_A' and 'sub-query' are not joined." communicating with a MariaDB ColumnStore


Published: 29 Nov 2022
Last Modified Date: 01 Dec 2022

Issue

While communicating with the data source on a MariaDB Database and using ColumnStore as the table storage engine, an error occurs: 

Bad Connection: Tableau could not connect to the data source.
[ma-3.1.13][10.5.10-7-MariaDB-enterprise]Internal error: IDB-1000: 'TABLE_A' and 'sub-query' are not joined.


An example of the issued query is shown below. Running the same query on the MariaDB database side directly via other workbench clients like MySQL Workbench or A5SQLMk2 results in the same error.

SELECT
    SUM(`TABLE_A`.`col_a`) AS `sum_col_a_ok`,
    `t1`.`col_b` AS `col_b`
FROM `TABLE_A`
  INNER JOIN (
              SELECT 
                  `TABLE_A`.`col_c` AS `col_c`,
                  `t0`.`col_b` AS `col_b`
                  FROM `TABLE_A`
                  LEFT JOIN (
                             SELECT `TABLE_B`.`col_b` AS `col_b`,
                                   (`TABLE_B`.`col_d` / 1000) AS `$temp0`,
                                   (`TABLE_B`.`col_e` / 1000) AS `$temp1`
                             FROM `TABLE_B`
                             ) `t0`
                             ON (
                                    (`TABLE_A`.`col_c` > `t0`.`$temp0`)
                                    AND
                                    (`TABLE_A`.`col_c` <= `t0`.`$temp1`)
                                )
                             GROUP BY 2,1
                  ) `t1`
                   ON (
                          (`TABLE_A`.`col_c` <=> `t1`.`col_c`)
                          AND
                          (`TABLE_A`.`col_c` <=> `t1`.`col_c`)
                      )
                   GROUP BY 2

Environment

  • Tableau Desktop
  • Tableau Server
  • MariaDB Enterprise Server 10.5.10-7 (including ColumnStore 5.6.1)

Resolution

Option 1

Use an extract instead of a live connection when connecting to a MariaDB ColumnStore.

Option 2

Work with your IT team to change the storage engine of your tables on MariaDB database from ColumnStore to InnoDB for avoiding the IDB-1000 error of the ColumnStore.

Cause

This is an internal error on the MariaDB Enterprise ColumnStore when the subquery contains nested joins.
Did this article resolve the issue?