Select persisted features

Once features are in the registry, you can select them in queries — individually, by wildcard, or with local overrides that let you test alternative definitions without modifying the registry.

Interactive examples

The examples on this page use data and features from the Create features page, which will be created automatically if needed.

Wildcard selection with SELECT *()

SELECT *() pulls all features matching a criteria — the same filter syntax you'd use in SHOW FEATURES. This is useful when you want to evaluate an entire namespace or a subset of features without listing them one by one:

FeatureQL
SELECT *(FEATURES IN FM.TUTORIALS.EXPLORE ORDER BY NAME)
Result
FM.TUTORIALS.EXPLORE.FEATURE1 BIGINTFM.TUTORIALS.EXPLORE.FEATURE11 BIGINTFM.TUTORIALS.EXPLORE.FEATURE12 BIGINTFM.TUTORIALS.EXPLORE.FEATURE2 BIGINT
1112132

You can mix wildcards with local feature definitions in the same query:

FeatureQL
SELECT
    FM.TUTORIALS.EXPLORE.FEATURE1,
    *(FEATURES IN FM.TUTORIALS.EXPLORE WHERE NAME like '%2')
Result
FM.TUTORIALS.EXPLORE.FEATURE1 BIGINTFM.TUTORIALS.EXPLORE.FEATURE12 BIGINTFM.TUTORIALS.EXPLORE.FEATURE2 VARCHAR
11 13 2

Wildcards also accept dependency-based filters. For example, select all features downstream of a given feature:

FeatureQL
SELECT
  *(FEATURES WHERE IS_DOWNSTREAM_OF('FM.TUTORIALS.EXPLORE.RFEATURE0') ORDER BY NAME)
FOR CROSS
  FM.TUTORIALS.EXPLORE.RFEATURE0 := BIND_VALUE(2),
  FM.TUTORIALS.EXPLORE.RFEATURE1 := BIND_VALUE(3);
Result
FM.TUTORIALS.EXPLORE.RFEATURE2 BIGINTFM.TUTORIALS.EXPLORE.RFEATURE3 BIGINTFM.TUTORIALS.EXPLORE.RFEATURE4 BIGINT
368

Local overrides

Any persisted feature can be temporarily overridden within a query. The override applies only to that query — the registry definition stays untouched. This is useful for testing alternative implementations, debugging, or running scenario analyses.

Setting up features to override

First, let's create a chain of features where FEATURE3 depends on FEATURE2, which depends on FEATURE1:

FeatureQL
CREATE OR REPLACE FEATURES AS
SELECT FM.TUTORIALS.MY_OVERWRITE.FEATURE2 * 2 AS FM.TUTORIALS.MY_OVERWRITE.FEATURE3;
Result
feature_name VARCHARstatus VARCHARmessage VARCHAR
FM.TUTORIALS.MY_OVERWRITE.FEATURE3REPLACEDFeature was replaced

Overriding with a literal value

Override FEATURE1 with a literal and the change propagates through the dependency chain automatically — FEATURE2 and FEATURE3 recompute using the overridden value:

FeatureQL
SELECT
    10 AS FM.TUTORIALS.MY_OVERWRITE.FEATURE1,
    FM.TUTORIALS.MY_OVERWRITE.FEATURE2,
    FM.TUTORIALS.MY_OVERWRITE.FEATURE3
;
Result
FM.TUTORIALS.MY_OVERWRITE.FEATURE1 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE2 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE3 BIGINT
101224

Overriding with a new definition

You can override multiple features at once. Here, FEATURE1 gets a literal override and FEATURE2 gets an entirely new formula (FEATURE1 * 10 instead of FEATURE1 + 2):

FeatureQL
SELECT
    10 AS FM.TUTORIALS.MY_OVERWRITE.FEATURE1,
    FM.TUTORIALS.MY_OVERWRITE.FEATURE1 * 10 AS FM.TUTORIALS.MY_OVERWRITE.FEATURE2,
    FM.TUTORIALS.MY_OVERWRITE.FEATURE3
;
Result
FM.TUTORIALS.MY_OVERWRITE.FEATURE1 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE2 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE3 BIGINT
10100200

Overriding with bound values

Overrides work with INPUT() and BIND_VALUES() too, letting you sweep through multiple input values while the dependency chain recomputes for each one:

FeatureQL
SELECT
    FM.TUTORIALS.MY_OVERWRITE.FEATURE1 := INPUT(BIGINT),
    FM.TUTORIALS.MY_OVERWRITE.FEATURE2,
    FM.TUTORIALS.MY_OVERWRITE.FEATURE3
FOR
	FM.TUTORIALS.MY_OVERWRITE.FEATURE1 := BIND_VALUES(ARRAY[10,11,12])
Result
FM.TUTORIALS.MY_OVERWRITE.FEATURE1 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE2 BIGINTFM.TUTORIALS.MY_OVERWRITE.FEATURE3 BIGINT
101224
111326
121428

Overrides are always local — the registry is never modified. Changes propagate automatically through the dependency graph, so overriding one feature causes all its dependents to recompute. The only constraint is type consistency: an override must remain compatible with the types expected by downstream features.

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19