Skip to content

Computed Files FAQ

Common questions about referencing, cost, file formats, Spark SQL, editing, and permissions.

Referencing and Joins

Can a Computed File reference another Computed File?

No. Computed Files are stored as metadata inside Qualytics. They are not created as real files on storage. Its query reads one file pattern of the datastore, never another Computed File. If you need to chain logic, write the intermediate step as a common table expression or a subquery inside the same query, or produce the intermediate result as real files on storage (via your own data pipeline) and sync it into Qualytics as a base file container.

Can a Computed File reference files from a different datastore?

No. A Computed File only sees the base file containers of its own parent DFS source datastore. For cross-datastore composition, use a Computed Join.

Can I use a Computed File as an input to a Computed Join?

Yes. A Computed Join can be built on top of tables, views, Computed Tables, or Computed Files as long as each input has been profiled. The only input a Computed Join cannot accept is another Computed Join.


Materialization and Cost

Are Computed Files materialized on storage?

No. The Spark SQL definition is stored as metadata inside Qualytics and executed against the source files every time the container is scanned, profiled, or previewed. Nothing is written back to storage.

Does saving a Computed File trigger a scan?

No. Saving stores the query and runs a basic profile that samples up to 1000 records per partition so field statistics appear immediately. A full profile and any scans run only when you or a schedule kick them off.

How can I reduce the cost of a slow Computed File?

The Spark SQL expression runs every time the container is scanned or profiled, so slow queries scale their cost with scan frequency. To speed things up: narrow the input with a WHERE clause, prefer columnar formats (Parquet, ORC) over row-based formats (CSV, JSON) for large sources, and split very heavy preparation into an upstream pipeline that writes cleaned files that Qualytics syncs as a base file container.


File Format Behavior

Which file formats can back a Computed File?

Any format the parent DFS datastore already supports for base file containers: Parquet, ORC, Avro, CSV, TSV, PSV, JSON, plus Excel (.xls, .xlsx, .xlsm) and table formats such as Delta and Iceberg. Compression codecs (Snappy, gzip, and so on) are decoded automatically. If a source file container already scans and profiles successfully, it is eligible as a Computed File source.

Where does the Computed File SQL execute?

In Qualytics. Unlike Computed Tables on JDBC datastores, which push their query down to the warehouse's engine, Computed Files run their Spark SQL query directly on the files Qualytics reads from the DFS datastore. Write the query in Spark SQL whether Amazon S3, Google Cloud Storage, or Azure Data Lake Storage backs the datastore. See Query Rules.

Can the query flatten arrays with LATERAL VIEW?

Yes. Write LATERAL VIEW in the query itself, for example LATERAL VIEW OUTER EXPLODE(tags) t AS tag, and select the alias it declares (tag). EXPLODE, POSEXPLODE, INLINE, STACK, and JSON_TUPLE all work, as does the explode(...) function in the column list. See the Array Explosion tab in Examples.

Can the query use DISTINCT?

Yes. SELECT DISTINCT and COUNT(DISTINCT ...) are accepted in the query. Only Computed Files still defined by separate clauses refuse DISTINCT in their select expression, until their query is edited and saved. See Files Built from Separate Clauses.

Is the query carried over when I promote a Computed File?

Yes. The query is copied to the destination, with the file it reads replaced by the destination file pattern you map it to. A change to the query alone is enough for a re-promotion to update the destination. See Promote Computed Files.

Why is my query refused for reading more than one file?

A Computed File reads exactly one file pattern of its datastore, and the error names the files your query reads. Keep one file in the query, and use a Computed Join to combine files.

Why does Validate say nested arrays of structs go deeper than supported?

One of the output columns is an array of arrays of structs (array<array<struct>>) whose structs hold another struct. A common cause is collect_list() over an array of items where each item has a struct field, such as a price with amount and currency. Qualytics can profile the fields of those structs only when they are scalars or arrays, so Validate and Save both refuse the definition, and the message names the field, for example order_items.price. Select the nested struct's fields as separate fields instead, for example with transform() and named_struct() in the query. See Nesting Depth for a worked example.


Editing and Timeline

Does editing the definition re-run the profile?

Yes. Saving a change to the query immediately triggers a synchronous slim profile so field statistics refresh right away, followed by a full asynchronous profile. Existing quality checks are preserved, and anomalies raised against the older version remain in the anomaly history.

What happens if my edit drops a field that a quality check depends on?

Qualytics blocks the save and shows a Fields will be marked as missing warning listing the affected fields. You can either click Review Query to adjust the query so the field is still returned, or confirm Proceed Anyway to save the new definition. The affected fields are marked as missing. Their quality checks stay active and their anomalies are kept, so they pick up again if the fields reappear.

Can I see previous versions of the definition?

Yes. Open the container's Timeline to see the changes in order. Query changes collapse behind a View changes control, whatever their size, that opens the previous and new query side by side in a Query Changes dialog, with changed lines highlighted, a copy button on each side, and the user and timestamp of the change.


Permissions

Who can create a Computed File?

Any user with the Editor or Author team permission on the parent datastore. Authors can only create Computed Files they own themselves, while Editors can create Computed Files owned by any user.

Who can reassign ownership?

Only users with the Editor team permission. Authors cannot change the owner of a Computed File, even one they own.