m-lab / etl

M-Lab ingestion pipeline
Apache License 2.0
22 stars 7 forks source link

Add etl.Metadata for passing task metadata to parsers #1117

Closed stephen-soltesz closed 1 year ago

stephen-soltesz commented 1 year ago

This change adds a new type etl.Metadata and modifies the etl.Parser interface to accept this structure instead of the ad-hoc map[string]bigquery.Value map.

This change eliminates unused fields in the map (i.e. "attempt"=1), uses standard names for the ArchiveURL (rather than "filename", which is ambiguous with the parser's use of ParseInfo.Filename), and eliminates type casts to recover values from the bigquery.Value type.

While this alters the parser interface, this is a code health improvement, and there should be no users of this interface outside this repo. This change does not alter default behavior.

Part of:


This change is Reviewable