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

Make it possible to set explicit schema i.s.o letting AutoLoader infer the schema #40

Merged

Conversation

BrendBraeckmans
Copy link
Contributor

@BrendBraeckmans BrendBraeckmans commented Jun 5, 2024

Description

Make it possible to set explicit schema i.s.o letting AutoLoader infer the schema.
Optional schema argument has been added

Related Issue

koheesio-39

Motivation and Context

The current implementation of AutoLoader within koheesio will always infer the schema from the files it reads. In a lot of cases this is unnecessary and might even give issues if the input data doesn't contain the required fields.

How Has This Been Tested?

  • Through UTs
  • On DBX

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@BrendBraeckmans BrendBraeckmans requested a review from a team as a code owner June 5, 2024 17:34
Copy link
Member

@dannymeijer dannymeijer left a comment

Choose a reason for hiding this comment

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

See comments.

src/koheesio/spark/readers/databricks/autoloader.py Outdated Show resolved Hide resolved
src/koheesio/spark/readers/databricks/autoloader.py Outdated Show resolved Hide resolved
Copy link
Contributor

@maxim-mityutko maxim-mityutko left a comment

Choose a reason for hiding this comment

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

lgtm

@dannymeijer dannymeijer merged commit 2f040f0 into Nike-Inc:main Jun 10, 2024
12 checks passed
@dannymeijer dannymeijer linked an issue Jun 10, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEATURE] Specify explicit schema for AutoLoader
3 participants