8000 Reattach a ducklake with MySQL catalog · Issue #70 · duckdb/ducklake · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reattach a ducklake with MySQL catalog #70

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

Open
adrien-ferrara opened this issue May 28, 2025 · 5 comments
Open

Reattach a ducklake with MySQL catalog #70

adrien-ferrara opened this issue May 28, 2025 · 5 comments

Comments

@adrien-ferrara
Copy link
adrien-ferrara commented May 28, 2025

Hello,

Maybe I missed some information somewhere.

I set up a DuckLake with a MySQL catalog, everything seemed fine, but when I wan't to reattach it I run into those errors:

  • Without specifying DATA_PATH:

ATTACH 'ducklake:mysql:db=ducklake_catalog host=192.168.1.100 user=root port=3306 password=xxx' AS myDucklake ; Invalid Input Error:
Attempting to create a new ducklake instance but data_path is not set - set the DATA_PATH parameter to the desired location of the data files

  • Specifiying DATA_PATH

ATTACH 'ducklake:mysql:db=ducklake_catalog host=192.168.1.100 user=root port=3306 password=xxx' AS myDucklake (DATA_PATH 'data_files/');
IO Error: Failed to initialize DuckLake:Failed to run query "CREATE TABLEducklake_catalog.ducklake_metadata(keyTEXT NOT NULL,value TEXT NOT NULL);": Table 'ducklake_metadata' already exists

@arjenpdevries
Copy link

Are you sure that the database is not attached already?

You could try DETACH or SHOW databases; to find out.

@adrien-ferrara
Copy link
Author

Are you sure that the database is not attached already?

You could try DETACH or SHOW databases; to find out.

Yes pretty much, also tried to close and open a new client before attaching the existing ducklake.

@ryanschneider
Copy link

Make sure you don't have another duckdb session open in another terminal. I noticed that attachments are shared across all open :memory instances, which can definitely lead to some unexpected results. For example I was testing mysql and postgres catalogs in two separate terminals but used the same AS my_ducklake name for both attachments and they kept stepping on each other.

@kjkit
Copy link
kjkit commented May 28, 2025

Hello,
I have the same problem with DuckLake.
Test spec:

  1. DuckDB CLI on Win11,
  2. DB Engine: MySQL(MariaDB) - 10.3.39-MariaDB-0ubuntu0.20.04.2 Ubuntu 20.04
    Database Collation: utf8mb4_general_ci and Engine Type: InnoDB.
  3. Data files local on Win11

Image

@adrien-ferrara
Copy link
Author

So after seeing this issue: #112

It seems that adding the METADATA_SCHEMA option solves the problem:

ATTACH 'ducklake:mysql:db=ducklake_catalog host=192.168.1.100 user=root port=3306 password=xxx' AS ducklake_catalog (DATA_PATH 'data_files/' , METADATA_SCHEMA 'ducklake_catalog');

I'm just wondering if this is normal and the relevant way to do this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0