doris icon indicating copy to clipboard operation
doris copied to clipboard

doris是否支持表结构导出

Open lambgong opened this issue 6 years ago • 10 comments

doris是否支持类似mysqldump这种工具,可以导出整个库的表结构之类的?

lambgong avatar Aug 20 '20 07:08 lambgong

目前并不支持,不过这确实是一个好需求。 但doris的表结构导出后,应该只能给doris自身使用。并不适合mysql数据库。因为doris本身的数据模型和mysql是不一样的。

目前你可以通过 show create table table_name 命令来查看建表的sql。但不能批量导出。

It is not currently supported, but it is indeed a good demand. But after the table structure of doris is exported, it should only be used by doris itself. Not suitable for mysql database. Because the data model of doris itself is different from mysql.

EmmyMiao87 avatar Aug 20 '20 07:08 EmmyMiao87

@EmmyMiao87 same problem, we want to use a table structure to create a new table,no data. mysql has create table like xxx, if doris has it, that would be nice

francisoliverlee avatar Aug 21 '20 03:08 francisoliverlee

@francisoliverlee The grammar you mentioned only needs to modify the grammar files sql_parser.cup and add a new CreateTableLikeStmt in analysis package. This function is not very complicated.

Does anyone want to help doris realize it?

EmmyMiao87 avatar Aug 21 '20 03:08 EmmyMiao87

@EmmyMiao87 @WingsGo is doing it now #4405

caiconghui avatar Aug 21 '20 03:08 caiconghui

@caiconghui Great! Please mention this issue in PR #4405

EmmyMiao87 avatar Aug 21 '20 03:08 EmmyMiao87

十分感谢,我测试一下

lambgong avatar Aug 22 '20 15:08 lambgong

Related PR #4705. I think that this issue can close.

jackwener avatar Jan 09 '22 11:01 jackwener

See #7041

morningman avatar Jan 09 '22 12:01 morningman

See https://github.com/apache/doris/pull/7041

lucklilili avatar May 08 '23 04:05 lucklilili

support

lucklilili @.***> 于2023年5月8日周一 12:30写道:

See #7041 https://github.com/apache/doris/pull/7041

— Reply to this email directly, view it on GitHub https://github.com/apache/doris/issues/4402#issuecomment-1537729941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGIITJHEYERJ2MQSOOERTLXFBZE3ANCNFSM4QFXMREA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- 张家峰

hf200012 avatar May 08 '23 04:05 hf200012