OpenMetadata
OpenMetadata copied to clipboard
Allow 1-click option to copy table DDL statement
Is your feature request related to a problem? Please describe. Today, users who want to re-create a table need to write down the entire DDL statement to create a table. This can be various tedious activity, especially for tables with many column. Often there are other tables with similar schema from where it would be useful to extract the DDL statement to then modify it and execute it for the new table.
Describe the solution you'd like Provide a one-click option to extract the table DDL statement for a table. Since OM already has the table schema, it has all the information needed.
CREATE TABLE {schemaName}.{tableName} (
column1 numeric(38,0) NOT NULL ENCODE lzo,
column2 character varying(765) NOT NULL ENCODE lzo distkey,
column3 integer NOT NULL ENCODE lzo,
PRIMARY KEY (column1)
)
DISTSTYLE KEY;
We should extract the DML for a given table and push it into dataModel and to differentiate between DBT or source we should introduce dataModelProvider
@OnkarVO7 lets prioritize for the next release. Asked by our customers as well.
i will be working on this
Handling 10 most used connectors as part of the first iteration:
- [ ] Mysql
- [ ] Postgres
- [ ] Oracle
- [ ] Redshift
- [ ] Bigquery
- [ ] Snowflake
- [ ] Databricks
- [ ] Clickhouse
- [ ] Mssql
- [ ] Hive
cc: @SumanMaharana
UI
- [x] Include DDL checkbox
- [x] Table Details Page > DDL tab