cube-js / cube-js/cube

Tableau Extract fails due to unsupported query types

Open
#10,721 0 comments 0 reactions 0 assignees View on GitHub
api:sql
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

## Failed SQL

**1. CREATE LOCAL TEMPORARY TABLE**
```sql
CREATE LOCAL TEMPORARY TABLE "#Tableau___A_BE________D__F___B_____F_FF___D__C_1_Connect_Check" ("COL" INTEGER) ON COMMIT PRESERVE ROWS
```
`ERROR: Unsupported query type: CREATE LOCAL TEMPORARY TABLE`

**2. GROUP BY ordinal position**
```sql
SELECT "SUBCOL" AS "COL" FROM (SELECT 1 AS "SUBCOL") "SUBQUERY" GROUP BY 2
```
`ERROR: Initial planning error: Error during planning: Expression #SUBQUERY.SUBCOL could not be resolved from available columns: #Int64(2)`

**3. DROP TABLE (consequence of #1)**
```sql
DROP TABLE "#Tableau___A_BE________D__F___B_____F_FF___D__C_1_Connect_Check"
```
`ERROR: table "#tableau___a_be________d__f___b_____f_ff___d__c_1_connect_check" does not exist`

## Logical Plan

No `Can't rewrite plan` messages found in Cube logs.

## Tool

All three queries are automatically generated by **Tableau Desktop 2025.3** when connecting to Cube's SQL API via the PostgreSQL JDBC connector. These are part of Tableau's standard connection handshake and Extract process, they are not user-written queries.

## Version

Cube: **v1.6.21**
PostgreSQL JDBC Driver: 42.2.27
Tableau Desktop: 2025.3

## Additional context

When using a **Live connection**, Tableau only sends SELECT queries which work correctly. However, when creating an **Extract**, Tableau runs additional operations (temp tables, GROUP BY ordinal) as part of its connection validation and data retrieval process. The failure of these operations results in Extracts with missing data.

https://github.com/user-attachments/assets/1c18575a-7f94-4675-af87-d9941065c4b1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.