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

Workflow

class Workflow

Workflows are where data analysis happens on Redivis. Workflows are owned by a user or organization, and contain datasources, transforms, notebooks, parameters, and the tables they produce. Various methods allow you to create and delete workflows, to construct and list the entities within a workflow, and to query its tables.

Constructors

Method
Description

redivis.workflow(name[, options])

Return a Workflow, given its qualified reference (e.g., jane.my_workflow), or its name within the default user or organization.

Return the default workflow, if one is set.

Return a Workflow owned by an organization.

Return a Workflow owned by a user.

List the Workflows owned by an organization.

User.listWorkflows([maxResults])

List the Workflows owned by a user.

Examples

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

await workflow.exists(); // -> true
await workflow.get(); // workflow.properties is now populated with the workflow resource definition

workflow.table('output_table'); // -> Returns a Table
workflow.query('SELECT * FROM output_table'); // -> Returns a Query, scoped to the workflow
await workflow.listTables(); // -> Returns an array of Tables
const workflow = await redivis.workflow('jane.my_workflow').create();

// Add a dataset as a source of the workflow
const datasource = await workflow.datasource('demo.iris_species').create();

// Create and run a transform
const transform = await workflow.transform().create({
  sourceTable: 'demo.iris_species.iris',
  query: 'SELECT Species, AVG(SepalLengthCm) AS avg_sepal_length FROM _source_ GROUP BY Species',
});
await transform.run();

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

// Clean up
await transform.delete();
await datasource.delete();
await workflow.delete();

Attributes

Name
Description

name

The workflow's name.

organization

A reference to the Organization that owns the workflow. Will be undefined if the workflow is owned by a user.

user

A reference to the User that owns the workflow. Will be undefined if the workflow is owned by an organization.

properties

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

qualifiedReference

The fully qualified reference to this workflow, e.g. jane.my_workflow

scopedReference

The canonical reference for the workflow, without its owner.

Methods

Method
Description

Workflow.create([options])

Create the workflow.

Return a Datasource within the workflow.

Delete the workflow.

Check whether the workflow exists.

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

List the workflow's Datasources.

List the workflow's Notebooks.

List the workflow's Parameters.

Workflow.listTables([maxResults, options])

List the workflow's Tables.

List the workflow's Transforms.

Return a Notebook within the workflow.

Return a Parameter within the workflow.

Return a Query scoped to the workflow.

Return a Table within the workflow.

Return a Transform within the workflow.

Batch update variable metadata across the workflow's tables.

Was this helpful?