data.item — copyTo()

Description

The copyTo() method of the item object creates a duplicate of a stored dataset and saves it under the specified name.

Signature

data.item(sourceKey).copyTo(targetKey)
Scope
data
Family
item
Returns
mutates

Arguments

sourceKey (string)
The name of the dataset to copy.
targetKey (string)
The name of the destination dataset.

Example

// copy a dataset to another
data.item('table').copyTo('table_copy');