Save a Query as a 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.
Related
- Concept: Query Editor for what the editor saves.
- Computed Files for what a computed file is.
- Save a Query as a Computed Table for a database datastore.
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.
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.