Save a copy of an existing table as a new table.
source table reference
String. The name of the source table to save a copy of, optionally qualified by schema name.
target table spec
JSON. A specification for saving the new table. Note that fields are not used and persistence mapping is optional when using this command.
target table name
String. The name of the table to save the copy as.
target schema reference
String. The name of the schema to save the table in. Defaults to the current schema.
data source reference
String. The name of the data source to save the result with. Defaults to the default data source for the repository.
Integer. The exact number of partitions to save the resulting table with. Specifying this parameter will cause Magpie to shuffle the input data and repartition it into exactly this many partitions. This can be a computationally expensive operation. By default, Magpie specifies a maximum number of partitions for the save, as described below.
max partition count
Integer. The maximum number of partitions to save the resulting table with. If the source table contains more than this number of partitions, those partitions will be coalesced into no more than the number of partitions requested. Both partition count and max partition count cannot be specified at the same time. Defaults to the number of cores available in the Magpie cluster.
String. A comma-separated list of column names to partition the resulting table by. Default is unpartitioned.
with replace [with delete]
None. If present and a table already exists with the same name as the target table, this command will drop the existing table and replace it with this new table. If
with delete is also present, the underlying data for the existing table will be deleted. If a table does not already exist, this option has no effect. By default, an error will be thrown if a table exists with the same name as the target table.