Skip to content
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

cli export "create table" failed #3681

Closed
MichaelScofield opened this issue Apr 9, 2024 · 0 comments · Fixed by #3684
Closed

cli export "create table" failed #3681

MichaelScofield opened this issue Apr 9, 2024 · 0 comments · Fixed by #3684
Labels
C-bug Category Bugs good first issue Good for newcomers

Comments

@MichaelScofield
Copy link
Collaborator

What type of bug is this?

Unexpected error

What subsystems are affected?

Standalone mode

Minimal reproduce step

start a standalone instance, create a table with dots in its name:

create table `a.b.c.d` (ts timestamp time index)

then follow our docs to export the create table sql:

./greptime cli export --addr '127.0.0.1:4001' --output-dir /tmp/greptimedb-export --target create-table

What did you expect to see?

successful to export the create table sql

What did you see instead?

error:

2024-04-09T09:48:00.206017Z ERROR client::database: Failed to do Flight get, addr: 127.0.0.1:4001, code: Client specified an invalid argument, source: 0: Failed to do Flight get, code: Client specified an invalid argument
1: Invalid SQL, error: expect table name to be <catalog>.<schema>.<table>, <schema>.<table> or <table>, actual: greptime.public.a.b.c.d
2024-04-09T09:48:00.206154Z ERROR cmd::cli::export: Failed to export table greptime.public.a.b.c.d err=0: Failed to request database, sql: show create table greptime.public.a.b.c.d, at src/cmd/src/cli/export.rs:236:14
1: Failed to do Flight get, code: Client specified an invalid argument
2: Invalid SQL, error: expect table name to be <catalog>.<schema>.<table>, <schema>.<table> or <table>, actual: greptime.public.a.b.c.d

it's obviously that in cli export, we should quote the table name in the "show create table" sql.

What operating system did you use?

macos

What version of GreptimeDB did you use?

main

Relevant log output and stack trace

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants