Closed cemsbr closed 2 years ago
@cemsbr, could you identify the failed query the stack trace is referencing (20220701_142500_00059_xr5qr
in your example) and post its text? You can find it in the web UI.
these are not steps to reproduce the issue because we sync trino data sources during our E2E tests. I suggest you look at the trino UI and see if there are any errors there from the sync.
Also, when I see sync issues, it is usually an issue with my configs when creating a data source.
Thanks for the tips, @aalbu. The query is PREPARE statement232 FROM SHOW SCHEMAS FROM
.
Hello @cemsbr, unfortunately I cannot reproduce on my side. It looks like there may be some sort of syntax error based on this exception: Caused by: io.trino.sql.parser.ParsingException: line 1:43: mismatched input '<EOF>'. Expecting: <identifier>
.
Can you please provide the following info:
For the record, when I manually run SHOW CATALOGS
, for example, it works. But PREPARE statement232 FROM SHOW SCHEMAS FROM
has syntax error and it is expected to fail. Where is the prepare statement written? The requested info follows:
PREPARE statement57 FROM SHOW SCHEMAS FROM
I think I can reproduce. As a test can, you try to connect to a specific schema, not just the top level catalog. I expect connecting to a schema should work for you on your side. I believe the issue is related to connecting to a catalog directly.
Example, if the trino postgres connector is named PostgresConnector
and a database in postgres is named MyDB
, add the following to the metabase starburst driver:
Catalog: PostgresConnector
Schema: MyDB
That's it, @andrewdibiasio6! Catalog seems to be a required field, unless you never use it. I wrote one of our catalogs (Postgres) and it started syncing (schema was left empty), but I can't erase the catalog due to the required-field validation.
Shouldn't it support more than one catalog? Afterall, that's the point of Trino. I tried multiple catalogs separated by comma and semicolon, but it didn't work.
@cemsbr So to clarify, you were able to get this working with what config? Catalog, or Catalog + Schema?
It worked only by specifying catalog.
Great! And final question, so you had entered the wrong catalog when creating DB in metabase, and this resulted in metabase syncing forever. To resolve the issue, were you able to edit the existing DB, or did you delete it and create a new DB? @cemsbr
I did more testing.
/db_name?currentSchema=public
: must set catalog, schema is blank;@andrewdibiasio6, I didn't set the wrong catalog at first. It was just left blank. To make it work, I wrote the catalog and clicked in save. No need to create a new DB.
But I'm still wondering how can I join tables from different catalogs.
@cemsbr I appreciate all the info! I believe as of driver version1.0.4
you cannot click save when creating a DB with an empty catalog. Likely there may have been white space. On my side, catalog is required.
But I'm still wondering how can I join tables from different catalogs.
Not possible at the moment, I created this issue, feel free to look it over: https://github.com/starburstdata/metabase-driver/issues/38
What you can do right now is in trino, create the views/tables you want to be available in metabase.
Incorrect catalog resulted in sync failures. Specifying correct catalog allowed syncs to operate as normal.
I just tried to add a new DB with empty catalog and I couldn't. Maybe it was fixed in newer versions or there could be a white space, I don't know for sure, but I remember to see a gray "tpch" in the catalog input by the time.
Thank you for creating the other issue. I'll try the suggested workaround to work with different catalogs in a single query.
(As reported in https://github.com/metabase/metabase/issues/23665)
Describe the bug Right after connecting Trino to Metabase, "Syncing tables..." has been in the bottom-right corner for days. When browsing data, "This database doesn't have any tables". However, queries work fine.
Logs
To Reproduce Steps to reproduce the behavior:
Expected behavior Database sync process finishes and tables can be browsed.
Screenshots
Information about your Metabase Installation:
You can get this information by going to Admin -> Troubleshooting.
Severity Only native SQL queries are working. Thus, the majority of our users can't use Metabase.