Explore features
Discover and share features by searching, filtering, and analyzing relationships between features persisted in the FeatureMesh registry using FeatureQL commands.
Syntax
Diagram( Stack( Sequence( Terminal("SHOW"), Choice(0, Skip(), "MY"), Choice(0, Skip(), "RECENT"), Choice(0, "FEATURES", "FEATURE"), Choice(0, Skip(), Sequence(Terminal("("), Choice(0, Skip(), Sequence(Terminal("INCLUDE"), NonTerminal("include"))), Choice(0, Skip(), Sequence(Terminal("EXCLUDE"), NonTerminal("exclude"))), Choice(0, Skip(), Sequence(Terminal("COLUMNS"), NonTerminal("columns"))) , Terminal(")"))), ), Sequence( Choice(0, Skip(), OneOrMore(NonTerminal("feature_name"), ",")), Choice(0, Skip(), Sequence(Terminal("IN"), NonTerminal("namespace"), Choice(0, Skip(), Sequence(Terminal("UP TO LEVEL"), NonTerminal("level"))))), Choice(0, Skip(), Sequence(Terminal("LIKE"), NonTerminal("like"))), ), Sequence( Choice(0, Skip(), Sequence("WHERE", NonTerminal("where"))), Choice(0, Skip(), Sequence("ORDER BY", NonTerminal("order_by"))), Choice(0, Skip(), Sequence("LIMIT", NonTerminal("limit"))) ) ) )
Available Metadata Fields
Here's the list of available metadata fields that you can use in INCLUDE
, EXCLUDE
, COLUMNS
and the WHERE
and ORDER BY
clauses.
Field | Type | Description |
---|---|---|
id | VARCHAR | Unique identifier for the feature |
name | VARCHAR | Fully qualified name (includes namespace) |
datatype | VARCHAR | Data type of the feature |
function | VARCHAR | Associated function (as shown in SHOW FUNCTIONS) |
params | ROW | Parameter details (kind, name, type) |
created_at | ROW | Date of creation |
updated_at | ROW | Date of update |
Basic Examples
Setting up features for exploration
Basic feature listing
This shows the basic SHOW FEATURES
syntax with column selection and namespace filtering.
Feature replacement and dependencies
This example demonstrates replacing existing features and creating new ones with dependencies and comments.
Simplified Syntax Options
FeatureQL provides several shorthand commands for common queries:
-- Filter by name pattern
SHOW FEATURE NAME_OF_THE_FEATURE; -- Same as: WHERE name = 'NAME_OF_THE_FEATURE'
-- Filter by name pattern
SHOW FEATURES NAME_OF_THE_FEATURE1, NAME_OF_THE_FEATURE2; -- Same as: WHERE name IN ('NAME_OF_THE_FEATURE1', 'NAME_OF_THE_FEATURE2')
-- Filter by name pattern
SHOW FEATURES LIKE 'fm.customers.%'; -- Same as: WHERE name LIKE 'fm.customer.%'
-- Filter by namespace
SHOW FEATURES IN 'fm.customers'; -- Will return all features directly in the 'fm.customers' namespace, so fm.customers.project1.segment1 won't be returned
-- Filter by namespace and level
SHOW FEATURES IN 'fm.customers' UP TO LEVEL 2; -- Will return all features in the 'fm.customers' namespace up to level 2 so so fm.customers.project1.segment1 will be returned
-- Show features you maintain
SHOW MY FEATURES; -- Same as: WHERE point_of_contact = '<your_email>'
-- Show recent features ordered by date creation desc
SHOW RECENT FEATURES; -- Same as: ORDER BY created_at DESC LIMIT 50
These commands can be combined: @fql-playground(show_features_simplified)
Dependency Analysis
FeatureQL provides special operators for exploring feature dependencies that you can use in the WHERE condition.
IS_UPSTREAM_OF(feature)
: Returns true if the current feature is a dependency of the specified featureIS_DOWNSTREAM_OF(feature)
: Returns true if the current feature is dependant on the specified featureDEPTH_RELATIVE_TO(feature)
: Returns the relative depth of the current feature to the specified feature
Creating features with dependencies
To demonstrate relationship analysis, let's create a set of interconnected features:
This creates a dependency chain: RFEATURE0
→ RFEATURE2
→ RFEATURE3
→ RFEATURE4
, with RFEATURE1
also feeding into RFEATURE3
.
Analyzing feature dependencies
Upstream dependencies (what features does this feature depend on):
Downstream dependencies (what features depend on this feature):
Relative depth in the dependency graph:
These operators help you understand feature relationships and impact analysis when making changes to your feature set.