# Save a Query as a Computed File

Source: https://userguide.qualytics.io/explore/how-tos/queries/save-as-computed-file/

Turn a Spark SQL query you wrote in Explore on a file datastore into a computed file, so Qualytics profiles it and you can add quality checks to its rows.

> **Info: Related**
>
> - Concept: [Query Editor](https://userguide.qualytics.io/explore/deep-dive/query-editor/#save-as-computed-file) for what the editor saves.
> - [Computed Files](https://userguide.qualytics.io/container/computed-files/deep-dive/introduction/) for what a computed file is.
> - [Save a Query as a Computed Table](https://userguide.qualytics.io/explore/how-tos/queries/save-as-computed-table/) for a database datastore.

> **Note: Permission Required**
>
> Creating a computed file needs the **Editor** team permission on the datastore, or the **Author** team permission, which makes you the file's owner. See [Computed File Permissions](https://userguide.qualytics.io/container/computed-files/deep-dive/permissions/).

**Step 1:** Open a workspace on a file datastore. It runs in Qualytics with Spark SQL, and its SQL badge reads **Qualytics • Spark SQL**.

**Step 2:** Write a query over one file of the datastore. A query that reads more than one is refused when you validate or save it. If the editor holds several statements, select the SQL to save, or click inside the statement to save. The button saves what **Run** would run: the selection, or else the statement under the cursor.

**Step 3:** Click **Save as computed file**  under the editor, at its right. The **Add Computed File** dialog opens with the **Query** filled in.

**Step 4:** Enter a **Name**. Spaces in it are replaced by underscores. Optionally, add a **Description** and pick an **Owner**.

**Step 5:** Optionally, click **Preview**  next to the **Query** to see the first rows the computed file will hold.

**Step 6:** Click **Validate** to check the query, then click **Save**.

A success message appears: `Computed file created. Qualytics profiles it next.` The new file shows in **Assets**.

*Last updated: November 23, 2026.*
