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

Support snowflake.connector.pandas_tools.write_pandas #7

Open
tekumara opened this issue Jan 20, 2024 · 1 comment
Open

Support snowflake.connector.pandas_tools.write_pandas #7

tekumara opened this issue Jan 20, 2024 · 1 comment

Comments

@tekumara
Copy link

Use of snowflake.connector.pandas_tools.write_pandas fails with:

  File "./.venv/lib/python3.11/site-packages/snowflakeutils/table.py", line 329, in write_as_dataframe
    res = snowflake.connector.pandas_tools.write_pandas(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/pandas_tools.py", line 344, in write_pandas
    cursor.execute(upload_sql, _is_internal=True)
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/cursor.py", line 1098, in execute
    sf_file_transfer_agent.execute()
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/file_transfer_agent.py", line 398, in execute
    self._transfer_accelerate_config()
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/file_transfer_agent.py", line 697, in _transfer_accelerate_config
    client = self._create_file_transfer_client(self._file_metadata[0])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/file_transfer_agent.py", line 676, in _create_file_transfer_client
    return SnowflakeS3RestClient(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/s3_storage_client.py", line 90, in __init__
    self.transfer_accelerate_config(use_accelerate_endpoint)
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/s3_storage_client.py", line 106, in transfer_accelerate_config
    use_accelerate_endpoint = self._get_bucket_accelerate_config(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/s3_storage_client.py", line 572, in _get_bucket_accelerate_config
    response = self._send_request_with_authentication_and_retry(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/s3_storage_client.py", line 362, in _send_request_with_authentication_and_retry
    return self._send_request_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/storage_client.py", line 287, in _send_request_with_retry
    response = session.request(verb, url, **rest_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connectionpool.py", line 458, in _make_request
    httplib_response = conn.getresponse(buffering=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/vcrpy/_vendored/vcrpy/stubs/__init__.py", line 223, in getresponse
    if self.cassette.can_play_response_for(self._vcr_request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/vcrpy/_vendored/vcrpy/cassette.py", line 269, in can_play_response_for
    request = self._before_record_request(request)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/vcrpy/_vendored/vcrpy/config.py", line 226, in before_record_request
    request = function(request)
              ^^^^^^^^^^^^^^^^^
  File "./.venv/lib/python3.11/site-packages/snowflake/vcrpy/snowflake_vcrpy_pytest_plugin.py", line 41, in _process_request_recording
    code = request.uri.split("/results/")[1].split("/")[0]
@christiansegercrantz
Copy link

Hey, I think this is the same problem as I have posted here #6

No answer on that topic either unfortunately

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