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

SFTP x Excel cannot be tapped #90

Open
ElmoreV opened this issue Dec 3, 2024 · 0 comments
Open

SFTP x Excel cannot be tapped #90

ElmoreV opened this issue Dec 3, 2024 · 0 comments

Comments

@ElmoreV
Copy link

ElmoreV commented Dec 3, 2024

The tap as is, cannot correctly extract an Excel file from an SFTP server when connecting using a password.

I have found three issues in connecting to SFTP and tap an excel file, where two are fixed by PR #86 and the third is using a password in the uri as sftp://name:password@host:port//path/to/

At first connecting to the SFTP server and finding the file works as intended. The consequent streamreader then forgets that this is the intended route. A patch that works for me would be to add this in file format_hanlder.py in get_streamreader(uri,...):

def get_streamreader(uri, universal_newlines=True, newline='', open_mode='r', encoding='utf-8'):
    kwarg_dispatch = {
        "azure": lambda: {
            "transport_params": {
                "client": BlobServiceClient.from_connection_string(
                    os.environ['AZURE_STORAGE_CONNECTION_STRING'],
                )
            }
        },
        "sftp": lambda: {
            "transport_params": {
                   'connect_kwargs':{'look_for_keys':False}

            }
        }
    }

but this seems to prevent a correct handling whenever keys are actually present and look_for_keys needs to be True.

Note: it might be due to keyfiles already existing in the /.ssh/ folder, and failing before the authentication using the password is never correctly checked.

@ElmoreV ElmoreV changed the title SFTP issues SFTP x Excel cannot be tapped Dec 3, 2024
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

1 participant