Assistants
FeatureQL provides several developer experience tools to help you understand, debug, and optimize your queries.
These assistants are essential for productive feature development and troubleshooting.
Query analysis tools
Explain
By prefixing any query with EXPLAIN
, you can get detailed information about parsing, query planning, and transpilation.
The EXPLAIN
output includes:
- query_sql: The generated SQL for your target backend
- query_outputs: Schema information for result columns
- entities: Entity relationships discovered in the query
- user: Context information about the execution environment
Describe features
DESCRIBE
provides detailed information about specific features, working with both persisted and temporary features.
The DESCRIBE
output shows:
- Feature metadata: Name, function, parameters, and status
- Dependencies: How features relate to each other
- Properties: Feature modes and persistence settings
- Type information: Input and output type details
Feature recreation tools
Show create features for temporary features
SHOW CREATE FEATURES feature1, feature2...
returns the FeatureQL code necessary to recreate the specified features.
It works on temporary features:
This example demonstrates how FeatureQL:
- Reorders features by dependency (VALUE layer before ADD layer)
- Shows internal representations using functions like
VALUE(1)
instead of raw literals - Preserves semantics while potentially changing syntax
Show create features for persisted features
For persisted features, the tool works similarly but includes full namespace information:
Key benefits for feature lineage:
- Topological ordering: Features are ordered by their dependency relationships
- Self-contained queries: All dependencies are made explicit
- Standardized formatting: Consistent code style across features
The results show features after internal rewriting, which may differ from your original syntax. This can sometimes be misleading when debugging.
Cross-dialect transpilation
You can view the generated SQL for any supported backend by specifying the target dialect:
This shows the actual SQL that would be executed in DuckDB, including:
- CTEs (Common Table Expressions): How FeatureQL organizes query layers
- Stage comments: Internal documentation of the query plan
- Dialect-specific syntax: Backend-appropriate SQL syntax
Supported dialects: DUCKDB
, TRINO
, BIGQUERY
, DATAFUSION
Documentation exploration
Browse documentation
You can explore the built-in documentation system using SHOW DOCS
:
This command helps you:
- Find relevant documentation by filtering on content
- Explore documentation structure through the category system
- Search by content length or other metadata
The documentation system includes pages from the user guides, API references, and examples, making it easy to find help without leaving your query environment.