Open jklukas opened 3 years ago
SchemaStore uses SnakeCase
for normalization, so assuming the BQ form with underscores rather than the ping form with hyphens. So I guess we don't actually have canonical logic implemented for normalizing doctype and namespace URI elements to the hyphenated form.
Another way of looking at this is that our current pipeline behavior is too lenient. We should probably be sending documents to error output if the URI contains extraneous characters like "
in the doctype or namespace places. But it's probably a good thing to be tolerant of casing anomalies.
In
ParseUri
we don't normalize the doctype and namespace names. Instead, we rely onSchemaStore
to normalize those attributes when looking up schemas.This means that the
metadata.uri.document_namespace
field in BQ may contain weird things like capital letters or extraneous punctuation like"
. This sometimes complicates monitoring queries and is generally unexpected behavior. See https://github.com/mozilla/bigquery-etl/pull/2388 for an example of needing to apply normalization.