Kaleb King
06/07/2024, 11:50 AMsnowflake.connector.errors.RequestExceedMaxRetryError: GET with url b'<https://sfc-eu-ds1-20-customer-stage.s3.amazonaws.com/?accelerate>' failed for exceeding maximum retries.
Marvin
06/07/2024, 11:50 AMI'm trying to put a csv file into a Snowflake internal stage, but I'm getting the error shown below. I'm able to create the internal stage with the prefect-snowflake connector just fine.```Traceback (most recent call last): File "C:\Users\prefectservice\Documents\GitHub\Data-Warehouse\src\main.py", line 20, in <module> test_flow( File "C:\Users\prefectservice\Documents\GitHub\Data-Warehouse\venv\prefect\lib\site-packages\prefect\flows.py", line 1229, in call return enter_flow_run_engine_from_flow_call( File "C:\Users\prefectservice\Documents\GitHub\Data-Warehouse\venv\prefect\lib\site-packages\prefect\engine.py", line 293, in enter_flow_run_engine_from_flow_call retval = from_sync.wait_for_call_in_loop_thread( File "C:\Users\prefectservice\Documents\GitHub\Data-Warehouse\venv\prefect\lib\site-packages\prefect\_internal\concurrency\api.py", line 218, in wait_for_call_in_loop_thread return call.result() File "C:\Users\prefectservice\Documents\GitHub\Data-Warehouse\venv\prefect\lib\site-packages\prefect\_
Marvin
06/07/2024, 11:51 AMpython
from prefect_snowflake import SnowflakeCredentials
# Load your Snowflake credentials
snowflake_credentials_block = SnowflakeCredentials.load("BLOCK_NAME")
# Get client with retry settings
connection = snowflake_credentials_block.get_client(
retries=10, # Configure the number of retries
retry_sleep=5 # Configure the sleep duration between retries (in seconds)
)
2. Check Snowflake and AWS Connectivity: Ensure you have stable network connectivity to both Snowflake and AWS S3. Remember, Snowflake internal stages often use S3.
3. Audit Privileges: Make sure the Snowflake user has the correct permissions to access the internal stage and S3.
4. Snowflake Configuration: Validate and, if needed, update your Snowflake configuration, as well as retrying the connection logic if the failure might be due to transient network issues.
Refer to the Prefect Snowflake Connector Documentation for additional insights.
If these steps do not solve the issue, consider collecting more detailed logging information and contacting Snowflake support.
#### Resources
- Prefect Snowflake Connector
- Prefect-Snowflake Database Documentation
- Prefect-Snowflake Credentials
It’s tiresome, I know. But such is life with endless bugs, isn’t it?