Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize namespace and docType within ParseUri #1839

Open
jklukas opened this issue Sep 29, 2021 · 1 comment
Open

Normalize namespace and docType within ParseUri #1839

jklukas opened this issue Sep 29, 2021 · 1 comment

Comments

@jklukas
Copy link
Contributor

jklukas commented Sep 29, 2021

In ParseUri we don't normalize the doctype and namespace names. Instead, we rely on SchemaStore 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 mozilla/bigquery-etl#2388 for an example of needing to apply normalization.

@jklukas jklukas changed the title SnakeCase namespace and docType within ParseUri Normalize namespace and docType within ParseUri Sep 29, 2021
@jklukas
Copy link
Contributor Author

jklukas commented Sep 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant