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

Refactoring CsvFileConnector and CsvDataSource #1007

Closed
sebastian-peter opened this issue Feb 6, 2024 · 0 comments · Fixed by #1031
Closed

Refactoring CsvFileConnector and CsvDataSource #1007

sebastian-peter opened this issue Feb 6, 2024 · 0 comments · Fixed by #1031
Assignees
Labels
code quality Code readability or structure is improved

Comments

@sebastian-peter
Copy link
Member

sebastian-peter commented Feb 6, 2024

What I think this should look like is *Connectors taking care of operations close to the file system, and *DataSource handling higher-level decisions, i.e. where data is stored (paths/databases/etc.). With SqlConnector and SqlDataSource, this division is already in place.

Illustrating the desired change with examples in two areas:

  • Different exception handling
    CsvConnector should then throw (or return within Trys) ConnectorExceptions, and CsvDataSource should throw (or return within Trys) SourceExceptions.
  • Separate FileNamingStrategy from CsvFileConnector
    Currently, CsvFileConnector uses the FileNamingStrategy to determine paths of some entities. This is happening less with CsvDataSource should throw exceptions on error. #999, and should arguably move to CsvDataSource anyways. CsvFileConnector should not care where a path comes from, it should just deal with it.
@sebastian-peter sebastian-peter added the code quality Code readability or structure is improved label Feb 6, 2024
@sebastian-peter sebastian-peter changed the title Separate FileNamingStrategy from CsvFileConnector Refactoring CsvFileConnector and CsvDataSource Feb 7, 2024
@staudtMarius staudtMarius self-assigned this Feb 10, 2024
staudtMarius added a commit that referenced this issue May 1, 2024
sebastian-peter added a commit that referenced this issue Jun 13, 2024
…Connector-and-CsvDataSource

Refactor `CsvFileConnector` and `CsvDataSource`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code readability or structure is improved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants