Select persisted features

When working with persisted features, FeatureQL provides mechanisms to select multiple features at once and temporarily override their definitions for specific queries.

Interactive examples

To run the examples of this page, you must previously have created the features in the feature registry by running the queries of the Create features page.

Wildcard selection with SELECT *()

You can use wildcard syntax to select all features meeting given criteria:

Mix persisted features with local feature definitions:

The wildcard syntax accepts any criteria you would use in a SHOW FEATURES query, making it powerful for selecting feature subsets based on namespace, metadata, or dependency relationships.

Example: Select all features dependencies of a given feature.

@fql-playground(select_wildcard_query_dependencies)

Local feature overrides

You can temporarily override any persisted feature definition within a query without modifying the registry. This is useful for:

  • Testing alternative feature implementations
  • Debugging feature computations
  • Scenario analysis with different parameters

Creating overridable features

Overriding with literal values

This example shows overriding FEATURE1 with a literal value (10), which automatically propagates through the dependency chain to compute FEATURE2 and FEATURE3.

Overriding with new definitions

Here, both FEATURE1 gets a literal override and FEATURE2 gets a completely new definition (FEATURE1 * 10 instead of FEATURE1 + 2). The overrides cascade through the dependency graph.

Key behaviors:

  • Local scope: Overrides only affect the current query
  • Dependency propagation: Changes automatically flow through dependent features
  • Registry preservation: Original definitions remain unchanged in the registry
  • Type consistency: Overrides must maintain type compatibility with dependent features
Last update at: 2025/10/13 10:23:46