Conversation
willbarton
approved these changes
Mar 23, 2026
Member
willbarton
left a comment
There was a problem hiding this comment.
I think this is a really elegant solution to the possibilities of duplicate unrelated account numbers in a single event, without adding complexity to 🎉.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internal ticket number: 1003
For a single Metro2 event, files may be provided from multiple sources, which means consumer account numbers may not be unique. This PR attempts to prevent account number collision by adding a 'collection' parameter to the parsing process, which will be prepended to each consumer account number. This means that each source or collection of metro2 files will need to be parsed separately. When the
collectionparameter is omitted, the parser will behave the same as before.Changes
parsemanagement command to accept newcollectionparameterinitiate_parsingmethods to accept thecollectionparam and send them along to the parsercollectionparameter to theparse_from_segmentmethod on theAccountActivitymodel, where it gets prepended onto the consumer account number for each record.initiate_parsing.pyTesting
python manage.py testNotes
Todos
Add to the parsing documentation to explain how this feature is used.Checklist