Convert teleguard to LAVA @artifact_processor (4-way split + media migration)#834
Merged
Conversation
…gration)
Splits the Teleguard messenger parser into four decorated artifacts:
Messages, Posts, Contacts, and Channels. Message media (referenced by key
in the metadata JSON) migrates from media_to_html to a ('Media','media')
column backed by check_in_media (a list of refs per message); the
conflated raw metadata is split into its own 'Metadata' column. Contact
avatars (JPEG BLOBs) move from an inline base64 <img> to ('Avatar','media')
via check_in_embedded_media. All timestamps become aware UTC datetimes.
Channels keeps SELECT * (positional) to match the original schema
assumption. Reserved-word column audit run (clean).
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.
Converts
teleguard.py(Teleguard messenger) to the decorated@artifact_processorpattern — four artifacts (category Teleguard): Messages, Posts, Contacts, Channels.Media migration
metadataJSON, stored undercache/) move frommedia_to_htmlto a('Media','media')column viacheck_in_media— a list of refs per message so multiple attachments render. The raw metadata, previously crammed into the same Media column, gets its ownMetadatacolumn.<img>to('Avatar','media')viacheck_in_embedded_media.Other
createDate,userTime,lastActivityTime,lastVisitTime) → aware UTCdatetime.ChannelskeepsSELECT *(positional, sliced to 12) to match the original's schema assumption rather than guessing column names.Original dates (2024-01-09) preserved.