SELECT * and COUNT(*)) is not supported.
Why explicit columns are required
Cost transparency
NQL queries can have costs associated with them based on the data accessed. By requiring explicit column lists, you know exactly what data you’re requesting and can better predict query costs. Implicit column selection through* would obscure this.
Governance compliance
Narrative’s governance engine evaluates every query to determine what data can be accessed based on permissions and access rules. Explicit column lists allow the governance engine to make precise decisions about query eligibility. With wildcard syntax, the engine couldn’t determine ahead of time which columns would be accessed.Query plan optimization
This is especially important for Rosetta Stone queries. When you query Rosetta Stone, NQL compiles your query into SQL that pulls from multiple underlying tables. Consider this query:SELECT * FROM narrative.rosetta_stone would need to include every column from every table in the Rosetta Stone catalog. This would create massive query plans with potentially hundreds of tables in the union, even when you only need a few fields.
Migration from SQL
If you’re coming from standard SQL, here’s how to adapt your queries:Replace SELECT *
Instead of selecting all columns, list the specific columns you need:Replace COUNT(*)
For counting rows, useCOUNT(1):
COUNT(column_name):
Replace SELECT t1., t2.
In joins, enumerate the columns from each table:Benefits of explicit selection
While requiring explicit columns may seem like extra work, it provides several benefits:- Clearer intent: Your query documents exactly what data you need
- Faster queries: Only requested columns are processed and transferred
- Easier maintenance: Changes to the underlying schema won’t unexpectedly affect your query results
- Better cost control: You pay only for the data you actually use

