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
Oracle fails queries on joins with tables with long display names #15978
Comments
Thanks for logging this one, gave it a 👍 . Our use case has users two types of users; power users who are already familiar with the oracle table names, and those that need things translated into plain English. To fit that need, we create an alias the data model with the pattern "English Name (ORACLE_NAME)" for each table, therefore run into this issue somewhat frequently. We do have the "Friendly Table and Field Names" setting disabled as well. We are running 0.37.9 and Oracle 12c Standard Edition Release 12.1.0.2.0.
|
This should be easy to fix thanks to the new alias escaping stuff @jeff303 recently added in 0.41.0 |
i still have same problem - java 11 oracle 12.2
|
…19659) * Add failing test for #15978 * Improved test * Add new metabase.driver.query-processor.escape-join-aliases QP middleware * Test fix 🔧 * Add reference to #20307 * Add some extra dox * Test fixes for BigQuery drivers * revert unneeded change * Fix :bigquery and :bigquery-cloud-sdk mixup * Test fixes 🔧 * Test fix 🔧 * Remove comment I meant to remove
…19659) * Add failing test for #15978 * Improved test * Add new metabase.driver.query-processor.escape-join-aliases QP middleware * Test fix 🔧 * Add reference to #20307 * Add some extra dox * Test fixes for BigQuery drivers * revert unneeded change * Fix :bigquery and :bigquery-cloud-sdk mixup * Test fixes 🔧 * Test fix 🔧 * Remove comment I meant to remove
…tifiers (#19659) (#20349) * Add logic to truncate and uniquely-suffix column alias identifiers (#19659) * Add failing test for #15978 * Improved test * Add new metabase.driver.query-processor.escape-join-aliases QP middleware * Test fix 🔧 * Add reference to #20307 * Add some extra dox * Test fixes for BigQuery drivers * revert unneeded change * Fix :bigquery and :bigquery-cloud-sdk mixup * Test fixes 🔧 * Test fix 🔧 * Remove comment I meant to remove * Backport changes to legacy :bigquery driver * Add 0.42.0 version of middleware for new namespace * Fix test failures
Describe the bug
On Oracle, when making a join to a table with a long display name (which combined with the FK field display name is >30 bytes), then the query fails since 0.38.0
Possible workaround: Change table and column names to something shorter in Admin > Data Model.
Also recommended to disable or underscore "Friendly Table and Field Names" in Admin > Settings > General.
To Reproduce
Products-veeerylong-veeerylong-veeerylong
ORA-00904: "Products-veeerylong-veeerylong-veeerylong"."ID": invalid identifier
because it's incorrectly using display name instead of alias in the join-clause.Oracle pre-12.2 fails with
ORA-00972: identifier is too long
, since it doesn't support table/column/alias with more than 30 bytes, which the fix in 0.38.0 likely tried to solve, but caused breaking long table joins on all versions of Oracle.Full stacktrace
Information about your Metabase Installation:
Tested 0.37.8 thru 0.39.1 - works on 0.37.8 (for Oracle 12.2+, would always fail pre-12.2), regression since 0.38.0
Oracle has finally "officially" released Docker images a couple of days ago: https://hub.docker.com/r/gvenzl/oracle-xe
As an alternative to the ageing 11g that most have used thanks to: https://hub.docker.com/r/wnameless/oracle-xe-11g-r2
⬇️ Please click the 👍 reaction instead of leaving a
+1
orupdate?
commentThe text was updated successfully, but these errors were encountered: