Is there a way to create empty VDS?

Need to create a VDS that grows daily (by doing SQL UNION with new small incremental VDS files on daily basis).

For this, we need to start with empty VDS file that has no rows. Then new data will be added to it on daily basis. However, to create the empty VDS the CTAS requires selecting some rows atleast and could not figure out a way for doing empty Select command.

How to achieve this?

@KrishnaPG Creating a VDS with no rows to start with is easy, you can use WHERE 1=0. But creating a CTAS with zero rows is currently unavailable, I guess you are asking for the second option

Thank you @balaji.ramaswamy will try that where 1=0 condition.

One slightly related question to it is, what is the right way to clone /duplicate a VDS?

 Create VDS backup1 as (select * from anotherVDS)

Is there some other high performant API way apart from the above?

Before modifying / appending new rows to the VDS, I would like to take a snapshot backup of it as historic read-only copy. Is "select * " the best way or some other recommended method exists?

Thank you

@KrishnaPG Instead of select * from anotherVDS, use the original SQL of the first VDS unless you want anotherVDS and newVDS to be in the same graph

Thank you @balaji.ramaswamy I see what you mean.

Unfortunately the SQL of original VDS is created with complex joins and all from various different sources and we may not know that SQL command in our program.

So, if we just do

Create VDS backup1 as (select * from originalVDS)

the backup1 really does not get the “data” snapshot of originalVDS and just a reference, is it?

Would that mean if we change originalVDS afterwards, the backup1 also will be changed?

In that case, how to take a snapshot of a VDS (the actual data snapshot) in a way that unlinks it from any source and does not change w.r.to anything else?

@KrishnaPG None of the VDS’s store data, this is like any other database view you would have used

the difference is

option 1
create view v1 as select * from blah
create view v2 as select * from blah

option 2
create view v1 as select * from blah
create view v1 as select * from v2

You can use method 2 now