Tool or function to convert rowstore DDL to Columnstore and Vice Versa

Is there any tool that can convert a rowstore DDL to columnstore DDL and vice versa. If we get a function to convert the DDL and migrate the data as well, it would be great.

We don’t have anything to directly translate columnstore to rowstore DDL.

But in newer versions since 7.5, columnstore is the default (for variable default_table_type). So you can run rowstore DDL, then do SHOW CREATE TABLE and you will see the columnstore notation.

singlestore> drop table t;
Query OK, 0 rows affected (0.01 sec)

singlestore> create table t (a int);
Query OK, 0 rows affected (0.02 sec)

singlestore> show create table t;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                    |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `a` int(11) DEFAULT NULL,
  KEY `__UNORDERED` () USING CLUSTERED COLUMNSTORE
  , SHARD KEY () 
) AUTOSTATS_CARDINALITY_MODE=INCREMENTAL AUTOSTATS_HISTOGRAM_MODE=CREATE AUTOSTATS_SAMPLING=ON SQL_MODE='STRICT_ALL_TABLES' |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Why are you asking? If you want to try both rowstore and columnstore from one set of DDL, you could just change the default_table_type, and try the same DDL for both rowstore and columnstore.

Also, where do I make a new post for my question?

Is there a tool to convert stored procedure/function from Oracle to Singlestore?

@velumani.jaganathan can you create a new post rather than update this one? Put it in the tools category if you can. Go to

https://www.singlestore.com/forum/

and click “new topic” on the upper right.