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

HTTP/S? #2

Closed
andrewcstewart opened this issue Nov 13, 2020 · 5 comments
Closed

HTTP/S? #2

andrewcstewart opened this issue Nov 13, 2020 · 5 comments

Comments

@andrewcstewart
Copy link

Hi there. The README says this tap should work with HTTPS, but looking at the code it looks like it doesn't?

@ets
Copy link
Owner

ets commented Nov 13, 2020

smart_open supports http/s so it can open and read files using the protocol. However - take a look at line 101 here https://github.com/ets/tap-spreadsheets-anywhere/blob/master/tap_spreadsheets_anywhere/file_utils.py
That's the section where http/s isn't yet supported...it's where we collect all the available source files for a config block. For URLs we should probably just return a single target since a file listing isn't practical. Relatively easy PR if you're interested in contributing.

@andrewcstewart
Copy link
Author

Yep, I can take a stab at it.

Looking at the other list_files_in_* functions, I'm guessing we'd just do a simple passthrough of the URL here, returned as a single element list?

@ets
Copy link
Owner

ets commented Nov 14, 2020

Agreed - that seems like the best fit for a URL.

@andrewcstewart
Copy link
Author

Working on it now. Does the list_files function need to do anything else other than this?

def list_files_in_http_bucket(uri, search_prefix=None):
    entries = [uri]
    LOGGER.info("Found {} files.".format(entries))
    return entries

andrewcstewart added a commit to andrewcstewart/tap-spreadsheets-anywhere that referenced this issue Nov 14, 2020
@ets
Copy link
Owner

ets commented Nov 15, 2020

Added support in the latest update.

@ets ets closed this as completed Nov 15, 2020
ets pushed a commit that referenced this issue Feb 19, 2021
Bug fixes with schema generation and data coercion
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