Skip to content

Make domain parquet reader swappable via Protocol#137

Open
linnbjornerud wants to merge 1 commit into
mainfrom
data-reader-protocol
Open

Make domain parquet reader swappable via Protocol#137
linnbjornerud wants to merge 1 commit into
mainfrom
data-reader-protocol

Conversation

@linnbjornerud
Copy link
Copy Markdown
Contributor

Moved the domain data reading behind a ParquetReader Protocol.
UnencryptedParquetReader is now default implementation.

This should make it easy to swap reader implementations, and serves as a preparation for the upcoming EncryptedParquetReader, while keeping the current API behaviour unchanged.

Ref the first checklistitem in issue #129.

@linnbjornerud linnbjornerud requested a review from a team as a code owner June 5, 2026 12:00
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 5, 2026

Comment thread datastore_api/domain/data/__init__.py Dismissed
return UnencryptedParquetReader()


def process_event_request(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about making it a DataReader (UnencryptedDataReader) that includes each of these process* functions, and then DI'ing the DataReader based on a factory function (similar to _get_parquet_reader)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea! I will test 👍🏻

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

Successfully merging this pull request may close these issues.

2 participants