Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Transform

class Transform

Transforms are a series of data processing steps within a workflow, defined in SQL, which produce an output table. Various methods allow you to create, update, run, and delete transforms, and to reference their source and output tables.

Constructors

Method
Description

redivis.transform([name, options])

Return a Transform within the default workflow, or given its fully qualified reference (owner.workflow.transform).

Return a Transform within a specific workflow.

List the Transforms of a workflow.

Examples

const workflow = redivis.workflow('jane.my_workflow');

// Create a transform, whose name is generated
const transform = await workflow.transform().create({
  sourceTable: workflow.table('iris'),
  query: 'SELECT * FROM _source_ WHERE SepalLengthCm > 5',
});

// Run the transform, waiting for it to finish
await transform.run();

const outputTable = await transform.outputTable();
const rows = await outputTable.toRowsArray();

// Update an existing transform
await workflow.transform('my_transform').update({ query: 'SELECT * FROM _source_ LIMIT 100' });

// Delete a transform, along with its output table
await workflow.transform('my_transform').delete();

Attributes

Name
Description

name

The transform's name.

workflow

The Workflow that the transform belongs to.

properties

An object containing the API resource representation of the transform. This will only be populated after certain methods are called, particularly the get method.

qualifiedReference

The fully qualified reference to the transform.

scopedReference

The canonical reference for the transform, without its workflow.

Methods

Method
Description

Cancel the transform's current run.

Create the transform.

Delete the transform and its output table.

Check whether the transform exists.

Fetch the transform's metadata, populating transform.properties.

Return the transform's output Table.

Return every Table that the transform references.

Transform.run([options])

Run the transform.

Return the transform's source Table.

Update the transform's name, source table, or query.

Was this helpful?