Closed itgkarl closed 3 months ago
thanks, this worked in v49 right?
@paoliniluis Last version we used scale:Timestamp
wit Oracle successfully was v0.49.13
.
So yes. v49 seems to work.
@paoliniluis I just retested it with the same local setup i showed the error in v0.50.3. I can confirm, that it worked in v0.49.16 with the same setup. No error in v0.49.16
upd: please ignore the ask below, I managed to reproduce it but only in Safari on non-IANA timezones
@itgkarl could you please provide the backend response for the sql query you provided? In order to do that, you need to
http://*your_host*/api/dataset
{
"data": {
"rows": [
[
"2024-06-13T17:38:41Z",
10
],
[
"2024-06-14T17:38:41Z",
20
],
[
"2024-06-15T17:38:41Z",
5
]
],
"cols": [....],
"native_form": {...},
"format-rows?": true,
"results_timezone": "+00:00",
}
}
@alxnddr
Happy you could reproduce it. I looked into the response anyways. Maybe it still helps to validate the fix.
I get the error on Firefox 115-12-0esr
with following response:
{
"data":{
"rows":[
[
"2024-06-14T06:36:36Z",
10
],
[
"2024-06-15T06:36:36Z",
20
],
[
"2024-06-16T06:36:36Z",
5
]
],
"cols":[
{
"display_name":"CURRENT_DATE",
"source":"native",
"field_ref":[
"field",
"CURRENT_DATE",
{
"base-type":"type/Date"
}
],
"name":"CURRENT_DATE",
"base_type":"type/Date",
"effective_type":"type/Date"
},
{
"display_name":"VALUE",
"source":"native",
"field_ref":[
"field",
"VALUE",
{
"base-type":"type/Decimal"
}
],
"name":"VALUE",
"base_type":"type/Decimal",
"effective_type":"type/Decimal"
}
],
"native_form":{
"params":null,
"query":"SELECT CURRENT_DATE, 10 AS VALUE FROM DUAL\nUNION ALL\nSELECT CURRENT_DATE+1, 20 AS VALUE FROM DUAL\nUNION ALL\nSELECT CURRENT_DATE+2, 5 AS VALUE FROM DUAL"
},
"format-rows?":true,
"results_timezone":"+00:00",
"results_metadata":{
"columns":[
{
"display_name":"CURRENT_DATE",
"field_ref":[
"field",
"CURRENT_DATE",
{
"base-type":"type/Date"
}
],
"name":"CURRENT_DATE",
"base_type":"type/Date",
"effective_type":"type/Date",
"semantic_type":null,
"fingerprint":{
"global":{
"distinct-count":3,
"nil%":0.0
},
"type":{
"type/DateTime":{
"earliest":"2024-06-14T06:36:36Z",
"latest":"2024-06-16T06:36:36Z"
}
}
}
},
{
"display_name":"VALUE",
"field_ref":[
"field",
"VALUE",
{
"base-type":"type/Decimal"
}
],
"name":"VALUE",
"base_type":"type/Decimal",
"effective_type":"type/Decimal",
"semantic_type":null,
"fingerprint":{
"global":{
"distinct-count":3,
"nil%":0.0
},
"type":{
"type/Number":{
"min":5.0,
"q1":6.25,
"q3":17.5,
"max":20.0,
"sd":7.637626158259733,
"avg":11.666666666666666
}
}
}
}
]
},
"insights":[
{
"previous-value":20,
"unit":"day",
"offset":49734.85520833334,
"last-change":-0.75,
"col":"VALUE",
"slope":-2.5,
"last-value":5,
"best-fit":[
"+",
49734.85520833334,
[
"*",
-2.5,
"x"
]
]
}
]
},
"cached":false,
"database_id":2,
"started_at":"2024-06-14T06:36:36.578501Z",
"json_query":{
"type":"native",
"native":{
"query":"SELECT CURRENT_DATE, 10 AS VALUE FROM DUAL\nUNION ALL\nSELECT CURRENT_DATE+1, 20 AS VALUE FROM DUAL\nUNION ALL\nSELECT CURRENT_DATE+2, 5 AS VALUE FROM DUAL",
"template-tags":{
}
},
"database":2,
"middleware":{
"js-int-to-string?":true,
"userland-query?":true,
"add-default-userland-constraints?":true
}
},
"average_execution_time":null,
"status":"completed",
"context":"ad-hoc",
"row_count":3,
"running_time":16
}
@itgkarl thank you for additional information! We will include the fix in the next maintenance version
Reopen until the backport PR gets merged
Describe the bug
Since v0.50.x visualizations using
scale: Timeseries
(Bar, Line, Area, Combo) are not working with Oracle Databases any more.To Reproduce
oracle-jdbc-driver
into the plugins folder.Line
chart usingCURRENT_DATE
asscale:Timeseries
I used the latest ojdbc11.jar as jdbc driver. To reproduce the error i used the latest Oracle Database XE Release 21c
In my setup to reproduce the error i started a fresh metabase with a fresh oracle-xe Database with the following docker compose file:
Make sure u have a
plugins
folder with the ojdbc.jar in the folder you have the docker compose.yml. Start it withdocker compose up
. You can connect to the oracle database on:Expected behavior
The Line Chart should be rendered using
scale: Timeseries
Logs
Browser Console log:
Metabase Log:
No Errors here Error is in Frontend.
Information about your Metabase installation
Severity
Workaround exits using
scale:Ordinal
Additional context
Error only seen using an Oracle Database. Using H2-DB works fine
Using
scale: Ordinal
works as expected.Request to database works fine and result set is shown.:
Error is thrown in frontend while rendering the chart: