Download a Data Table
Download a Data Table as a CSV or Excel (xlsx) file.
Permissions Required
You must have permissions to read the Data Table for this request to succeed.
Method Signature
File download(String id);
File download(String id, String format);
File download(String id, String format, String directory);
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The id of the Data Table to get a readable stream of |
format | DataTableExportFormat | CSV or XLSX |
directory | String | The directory to save the download to. The Data Table's name will be preserved used as the file name. Defaults to a local temporary directory. |
returns | File | A File containing the contents of the Data Table |
Example
/*
* This example demonstrates downloading a Data Table
*/
import org.catalytic.sdk.CatalyticClient;
import java.io.File;
public class Program {
public static void main(String[] args) throws Exception {
// Create and Initialize Catalytic SDK Client
CatalyticClient catalytic = new CatalyticClient();
// Download specific Data Table by id
File file = catalytic.dataTables().download("8d20bdf5-d3bb-4a08-b05b-eb22a8b5c300");
}
}
Updated almost 4 years ago