Search code examples
snowflake-connector

Getting error when uploading csv to Snowflakes


Trying to upload a csv of size 100GB and getting this error after compressed files are created in tmp


   data = sf_file_transfer_agent.result()
  File "/apps/tools/python/python36/lib/python3.6/site-packages/snowflake/connector/file_transfer_agent.py", line 722, in result
    "errno": ER_FAILED_TO_UPLOAD_TO_STAGE,
  File "/apps/tools/python/python36/lib/python3.6/site-packages/snowflake/connector/errors.py", line 258, in errorhandler_wrapper
    error_value,
  File "/apps/tools/python/python36/lib/python3.6/site-packages/snowflake/connector/errors.py", line 309, in hand_to_other_handler
    cursor.errorhandler(connection, cursor, error_class, error_value)
  File "/apps/tools/python/python36/lib/python3.6/site-packages/snowflake/connector/errors.py", line 195, in default_errorhandler
    cursor=cursor,
snowflake.connector.errors.OperationalError: AttributeError("'StorageCredential' object has no attribute '_command'",)

Solution

  • Loading very large files (e.g. 100 GB or larger) is not recommended. Try to chuck the files into 100-250 MB size(compressed) and try.