Question
For the latest BQ AA SDK main, what is the BQ concept index? Is "concept" here meant in the RDFS/SKOS terminology sense? Is this a special kind of index that BigQuery materializes?
Answer
Short version: the BQ concept index is an SDK-generated normal BigQuery table, plus a __meta sibling table, used as a lookup surface for ontology entity resolution. It is not a native BigQuery index feature.
More precisely:
gm compile --emit-concept-index --concept-index-table <project.dataset.table> emits SQL text for two CREATE OR REPLACE TABLE statements.
- The main table has one row per
(entity_name, label, label_kind, language, scheme) tuple. Labels come from ontology entity names, synonyms, SKOS label annotations, and skos:notation.
- The
__meta table stores compile provenance and fingerprints so a runtime can later verify that the table still matches the ontology + binding that produced it.
- BigQuery does not automatically maintain this table. The operator materializes it by executing the emitted SQL, and refreshes it by rerunning
gm compile and executing the new SQL.
So "index" here is an SDK/domain term: a denormalized lookup table optimized for SQL joins and resolver queries. It is not CREATE SEARCH INDEX, CREATE VECTOR INDEX, or another native BigQuery-managed index structure.
What does "concept" mean here?
The term is related to SKOS/RDFS vocabulary, but the SDK uses it a little more broadly. In this context, a "concept" is a resolvable ontology entity candidate: something that free text can resolve to through labels, synonyms, notation, or scheme membership.
Relationship to SKOS/RDFS:
- Pure
skos:Concept resources imported from TTL become abstract ontology entities, usually with a skos_ prefix. These are included in the concept index even though they are not bound to BigQuery tables.
- Mixed OWL/RDFS + SKOS resources can also appear. If a resource is an OWL class and also a SKOS concept, OWL provides the structural entity and SKOS contributes labels/notations/scheme metadata.
- Concrete ontology entities that are bound to BigQuery tables are also included, even if they did not originate as
skos:Concept, because they can still be resolved from user/input text.
So the concept index is not only a table of SKOS concepts. It is a lookup table over the SDK ontology entities that are in resolver scope: abstract informational SKOS-derived entities are always included; concrete entities are included when they appear in the binding.
Why it exists
The concept index supports runtime/entity-resolution workflows such as:
- resolving free-text user inputs like
geo, audience, or product values to declared ontology entities;
- joining production traces to ontology labels in bulk SQL;
- computing coverage by SKOS scheme or taxonomy;
- later supporting
OntologyRuntime / resolver APIs on top of the same table.
Suggested docs clarification
docs/ontology/concept-index.md should probably state near the top:
The concept index is a normal BigQuery table emitted by the SDK compiler, not a BigQuery-native index object. "Concept" means a resolver-visible ontology entity, including but not limited to imported skos:Concept resources.
This would reduce confusion for readers who associate "index" with BigQuery Search/Vector indexes or "concept" strictly with SKOS.
Question
For the latest BQ AA SDK
main, what is the BQ concept index? Is "concept" here meant in the RDFS/SKOS terminology sense? Is this a special kind of index that BigQuery materializes?Answer
Short version: the BQ concept index is an SDK-generated normal BigQuery table, plus a
__metasibling table, used as a lookup surface for ontology entity resolution. It is not a native BigQuery index feature.More precisely:
gm compile --emit-concept-index --concept-index-table <project.dataset.table>emits SQL text for twoCREATE OR REPLACE TABLEstatements.(entity_name, label, label_kind, language, scheme)tuple. Labels come from ontology entity names, synonyms, SKOS label annotations, andskos:notation.__metatable stores compile provenance and fingerprints so a runtime can later verify that the table still matches the ontology + binding that produced it.gm compileand executing the new SQL.So "index" here is an SDK/domain term: a denormalized lookup table optimized for SQL joins and resolver queries. It is not
CREATE SEARCH INDEX,CREATE VECTOR INDEX, or another native BigQuery-managed index structure.What does "concept" mean here?
The term is related to SKOS/RDFS vocabulary, but the SDK uses it a little more broadly. In this context, a "concept" is a resolvable ontology entity candidate: something that free text can resolve to through labels, synonyms, notation, or scheme membership.
Relationship to SKOS/RDFS:
skos:Conceptresources imported from TTL become abstract ontology entities, usually with askos_prefix. These are included in the concept index even though they are not bound to BigQuery tables.skos:Concept, because they can still be resolved from user/input text.So the concept index is not only a table of SKOS concepts. It is a lookup table over the SDK ontology entities that are in resolver scope: abstract informational SKOS-derived entities are always included; concrete entities are included when they appear in the binding.
Why it exists
The concept index supports runtime/entity-resolution workflows such as:
geo,audience, orproductvalues to declared ontology entities;OntologyRuntime/ resolver APIs on top of the same table.Suggested docs clarification
docs/ontology/concept-index.mdshould probably state near the top:This would reduce confusion for readers who associate "index" with BigQuery Search/Vector indexes or "concept" strictly with SKOS.