Swirrl / datahost-prototypes

Eclipse Public License 1.0
0 stars 0 forks source link

Validate schemas meet our minimum standards #217

Closed kirahowe closed 1 year ago

kirahowe commented 1 year ago

We need schemas to provide at least enough information to support corrections, which means we need to validate the following requirements are met for each schema:

This PR is to validate that all schemas being created meet these requirements, otherwise we should return a validation error and not create the schema.

rosado commented 1 year ago

We validate the uploaded schema. The schema used: tpximpact.datahost.ldapi.routes.shared/LdSchemaInput here. Is there anything missing in it?

rosado commented 1 year ago

From slack

@kiramclean: it looks like right now it already checks the name and datatype, we also have to check that it includes the right column type/component descriptions (i.e. measure/dimension/attribute) and make sure that every schema has exactly one column that is a measure, one or more that are dimensions, and zero or more that are attributes @rosado: some of the schemas in test code have {"@type": "dh:DimensionColumn"} @kiramclean: I think the details about the key names etc. are flexible, we just need to know which columns correspond to which components of a potential future datacube in order to generate ids so that we can implement corrections and start the delta tool