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

SQLUpload io_handler API confusion #448

Closed
johnseq-iterative opened this issue Dec 22, 2021 · 1 comment
Closed

SQLUpload io_handler API confusion #448

johnseq-iterative opened this issue Dec 22, 2021 · 1 comment

Comments

@johnseq-iterative
Copy link

The SQLUpload task takes a parameter io_handler that can be used to run custom code and return a dataframe in the event you need custom processing.

Currently the run method of SQLUpload checks for io_handler but doesn't do anything with it.

The code should probably look like this:

        if self.io_handler is None:
            extension = Path(path).suffix
            read_fn = mapping.get(extension)

            if not read_fn:
                raise ValueError(
                    'Could not infer reading function for '
                    'file with extension: {}'.format(extension),
                    'pass the function directly in the '
                    'io_handler argument')
        else:
            read_fn = self.io_handler
@edublancas
Copy link
Contributor

Thanks for reporting this! It's fixed now, this will be part of the next release (coming up in the next few days)

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

No branches or pull requests

2 participants