Skip to main content
Orion runs comprehensive analyses in a Python notebook, giving you full visibility into the code behind its queries and transformations. The notebook lets you inspect its SQL or Looker queries, Python cells, and their outputs. Advanced users can optionally edit supported queries and Python cells directly, then have Orion rerun the notebook. Use it to check a calculation, correct a query, or reuse an analysis. Orion by Gravity captures the notebook during an analysis, without a separate save step. These instructions apply to notebooks in project chat. The notebook panel on a published dashboard is read-only. In projects using Warp Drive, notebook execution requires Full Analysis access.

Open the Notebook

In the conversation, select Session → Content, then Analysis Notebook. You can also select View on the Analysis Notebook card below the chat. The notebook belongs to that conversation. Reopen the conversation to return to its work.

Inspect Queries and Python

Expand Data Extractions to inspect the queries that brought data into the analysis. Depending on the source, these are SQL queries or source-specific requests. Use Copy query to review one elsewhere, or Download CSV to inspect its extracted rows. Expand Notebook Cells to inspect the Python that transforms those inputs. Each cell retains its code and recorded output. Follow the query and transformation together when checking filters, joins, or calculations. A chart alone does not show whether the calculation matches your question. Check the source, date range, and business definition before using the result.

Change the Analysis

Ask Orion in chat when the change concerns business meaning. For example: “Use our approved net revenue definition and compare the last 90 days by region.” Explain the intended correction rather than only asking for a different chart. To change code directly:
  1. Expand the relevant query or Python cell
  2. Edit the code in its editor
  3. Select Save in the edited card
  4. Read Orion’s response and inspect the resulting output
Save submits all pending notebook edits together. It sends a request to Orion rather than executing your draft directly. Orion reviews proposed Python edits before applying them and rerunning the notebook. If an edit is rejected, use the explanation to correct it. Query editing is available for supported, completed extractions. A read-only query can include an explanation of why it cannot be changed. Ask Orion to revise the analysis when the query cannot be edited. If a revised extraction fails, its previous successful version remains current. Correct the query and save again before treating the result as updated. An edited draft is not evidence of a successful rerun.
The refresh icon in the notebook header refreshes the displayed notebook state. To rerun the analysis against its sources, ask Orion in chat.

Rerun with Current Data

Ask Orion to rerun the analysis when you need newer results. Check the returned period and source freshness before comparing it with an earlier run. Use relative dates, such as “last 90 days”, for a rolling analysis. A fixed date range remains fixed unless you change it. Rerunning code does not make an upstream source current. For scheduled runs, use Create Workflow under Save as a Workflow. Follow Create a Workflow to choose the schedule and output. Validate the analysis before scheduling it.

Export Code and Results

Use Export notebook in the notebook header:
  • Download as .py: download the Python cells as a script
  • Download as .ipynb: download a Jupyter notebook with recorded cell outputs
Review the recorded outputs before sharing a Jupyter file. To download an extraction table, use its separate Download CSV control. An export does not recreate Orion’s connected environment. Set up the required packages, input data, and connections before executing the code elsewhere.

Reuse the Work

Save a table as a View when another analysis needs the same dataset. Use a Metric when you need to track a value over time. A Workflow runs recurring work and produces its configured outputs. Share the conversation to hand over the analysis. Start a Room when teammates should investigate in the same conversation.

Next Steps

Running Analyses

Ask a question and inspect the resulting work

Create a Workflow

Schedule an analysis after checking its results