English
Adapters
The catalog's models do not depend on any product. For some brokers and tools, the catalog also publishes files made from each model that they can load as they are, under /adapters/<name>/ (for example, a CSV template for a spreadsheet, or a definition to register a model in GeonicDB). These are called adapters. This page explains each file: what it is, how to use it and where to get it.
- An adapter only adds files; it does not change a
@context, a schema or an IRI. - Adapter files are rebuilt with the catalog and are not covered by the promise that published files never change. If you need the exact file later, keep a copy and note the subject version it was made from.
Files on the model pages
Files that do not depend on a product. Each model page has a button for each of them in its "Download" row. They all use the model's attribute names and IRIs as they are.
CSV template
- What it is: A CSV file with only the header row: fill in one row per entity in a spreadsheet and check it with the Table Schema. Longitude and latitude are WGS 84; list values are separated by ;.
- How to use it: Open it in a spreadsheet, add one row per entity and save it as CSV (UTF-8). Then check it with the Table Schema and turn it into entities of the model with
datamodels convert(Converting your data). - Where to get it: The "Download" row of each model page. Programs:
adapters.csvincatalog.json. To make it yourself:datamodels export <subject>/<Type> --to csv(guide). - Example:
Decision.csv
Table Schema
- What it is: A Frictionless Table Schema (v2) for the columns of a CSV file and their rules, so a CSV made in a spreadsheet can be checked with frictionless or another Table Schema tool. Column names are the attribute names.
- How to use it: Run
frictionless validate <CSV> --schema <this file>: it reports each cell that breaks a rule, by row and column. - Where to get it: The "Download" row of each model page. Programs:
adapters.table-schemaincatalog.json. To make it yourself:datamodels export <subject>/<Type> --to table-schema(guide). - Example:
Decision.tableschema.json
Structured output for AI
- What it is: A strict JSON Schema for the structured output of a large language model, to extract entities from documents in the shape of the model: the json_schema of OpenAI's Structured Outputs, or the input_schema of a Claude tool.
- How to use it: Send it with a request that asks the model to read a document (a PDF, an email): the answer is an entity in the shape of the model, ready to check with the model's JSON Schema. A model with an attribute of no fixed shape has none. Limits of strict mode: Structured output for AI.
- Where to get it: The "Download" row of each model page. Programs:
adapters.aiincatalog.json. To make it yourself:datamodels export <subject>/<Type> --to ai(guide). - Example:
DesignatedShelter.ai.json
PostgreSQL / PostGIS table
- What it is: A CREATE TABLE statement: columns are the attribute names in snake_case, with constraints for required attributes, allowed values and patterns; location is a geometry in SRID 4326 with a GiST index; descriptions and IRIs are in the comments.
- How to use it: Run it with
psql -f <this file>to get a table with constraints and a spatial index. The database needs the PostGIS extension (CREATE EXTENSION postgis). - Where to get it: The "Download" row of each model page. Programs:
adapters.postgisincatalog.json. To make it yourself:datamodels export <subject>/<Type> --to postgis(guide). - Example:
Decision.sql
Files for particular products
Model pages do not name a product, so these files are not on the model pages; find them from here.
GeonicDB
- What it is: Custom Data Model request bodies for GeonicDB, Geolonia's NGSI-LD broker, with
contextUrlincluded. - How to use it: POST it to GeonicDB's
/custom-data-modelsto register the model in a tenant; entities of that type are then validated against the model. - Where to get it: List by model. Programs:
adapters.geonicdbincatalog.json. To make it yourself:node adapters/geonicdb/export.mjs <subject>(guide). - Example:
Decision.json
Candidates for other brokers and tools are collected in #174; how to add one: adapters/README.md.