Gridscript

Pipelines

In GridScript, a pipeline defines a sequence of operations that process, transform, and visualize your data step by step. It lets you chain together multiple stages — such as importing files, running code, or generating charts — into a single, repeatable workflow.

What is a Pipeline?

A pipeline is a workspace-level asset that combines different stages of data analysis and transformation. Each stage operates on the shared context, passing its results to the next stage in the sequence.

  • Import Stage – Load data from files like .csv, .xlsx, or .json.
  • Code Stage – Write and execute JavaScript or Python code that processes or visualizes your data.
  • View Outputs – Each stage can render tables, charts, or logs to display results directly within the pipeline.
  • Run All – Execute the full sequence of stages in order, automatically passing context between them.

Pipeline Structure

A pipeline is made up of stages, each representing one step in your data workflow. You can add, remove, or reorder stages as needed. The shared context makes it easy to connect imported datasets with transformations or visualizations in later stages.

Stage Types

  • Import Stage: Allows importing datasets from local files. Supported formats include.csv, .xlsx, and .json. The imported data is stored in the pipeline’s shared context under a chosen field name.
  • Code Stage: Lets you write JavaScript or Python code to manipulate or visualize data. Each code stage runs inside an isolated Web Worker for performance and safety. Use helper functions such as:
    • table(data) – Display tabular data.
    • chart(options) – Render charts using AG Charts.
    • log(message) – Output text messages or errors.

Running Pipelines

You can execute individual stages or run the entire pipeline from the Toolbar. The toolbar also lets you save, import, and export pipelines for reusability.

  • Run All – Executes every stage in sequence, passing the updated context forward.
  • Save – Persists the current pipeline within your workspace.
  • Export GSPP – Downloads your pipeline as a .gspp file.
  • Import File – Loads a previously exported pipeline.

Visual Outputs

Each stage can generate visual feedback, including interactive tables, charts, or logs. You can zoom into visuals, export data as CSV, Excel, or JSON, or download charts as images.

Example Workflow

  1. Use an Import Stage to load your dataset (e.g., sales_data.xlsx).
  2. Add a Code Stage to transform or clean the data using JavaScript or Python.
  3. Add another Code Stage to visualize results using chart().
  4. Run the pipeline to see results update step-by-step.

Next Steps

After learning about pipelines, you can explore Tools to see the available data manipulation features, or visit Projects to understand how pipelines fit into your broader workflow.