{"id":24605,"library":"snowflake-ingest","title":"Snowflake File Ingest SDK","description":"Official Snowflake SDK for bulk file ingestion via Snowpipe. Version 1.0.12 supports streaming ingest and historical file loading. Released monthly.","status":"active","version":"1.0.12","language":"python","source_language":"en","source_url":"https://github.com/snowflakedb/snowflake-ingest-python","tags":["snowflake","ingest","snowpipe","data-loading","etl"],"install":[{"cmd":"pip install snowflake-ingest","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required for secure key-based authentication","package":"cryptography","optional":false}],"imports":[{"note":"Primary class for file ingestion operations","symbol":"SnowflakeIngestManager","correct":"from snowflake.ingest import SnowflakeIngestManager"},{"note":"Exception type for ingestion errors","symbol":"IngestError","correct":"from snowflake.ingest import IngestError"},{"note":"Class for constructing file requests","symbol":"FileIngestionRequest","correct":"from snowflake.ingest import FileIngestionRequest"}],"quickstart":{"code":"import os\nfrom snowflake.ingest import SnowflakeIngestManager, FileIngestionRequest\n\nmanager = SnowflakeIngestManager(\n    account=os.environ.get('SNOWFLAKE_ACCOUNT', ''),\n    user=os.environ.get('SNOWFLAKE_USER', ''),\n    private_key=open('/path/to/rsa_key.p8', 'rb').read(),\n    database='MYDB',\n    schema='PUBLIC'\n)\n\nrequest = FileIngestionRequest(\n    file='data.csv',\n    stage='MYSTAGE',\n    prefix='data/',\n    pipe='MYPIPE'\n)\nmanager.ingest_file(request)\nprint('File ingested successfully')","lang":"python","description":"Initialize manager with key-pair auth and ingest a single file."},"warnings":[{"fix":"Replace 'private_key_file' parameter with 'private_key' and read the file as bytes.","message":"In version 1.0.0, the authentication method changed from using 'private_key_file' to requiring a raw bytes private key.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use manager.ingest_file(request) for single file, or call it in a loop for multiple files.","message":"The method 'ingest_files' (plural) is deprecated in favor of 'ingest_file' (singular) with a batch parameter.","severity":"deprecated","affected_versions":">=1.0.5"},{"fix":"Replace dashes with underscores or use the locator form (e.g., 'myorg-myaccount' -> 'myorg_myaccount').","message":"SnowflakeIngestManager does not support account identifiers with hyphens. Use the full account name without dashes.","severity":"gotcha","affected_versions":"all"},{"fix":"Set historical=True in FileIngestionRequest if the file already exists in the stage.","message":"File ingestion requests for historical files (files already in stage) must use the 'historical: true' flag, otherwise they are ignored.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Convert private key to PKCS8 format: openssl pkcs8 -topk8 -inform PEM -outform PEM -in rsa_key.pem -out rsa_key.p8 -nocrypt","cause":"Private key format is incorrect or the key is not in PKCS8 format.","error":"snowflake.ingest.exceptions.SnowflakeIngestError: Error 301: Authentication token is invalid"},{"fix":"Install with: pip install snowflake-ingest, then import as: from snowflake.ingest import ...","cause":"The library is installed as 'snowflake-ingest' but import path is wrong.","error":"ModuleNotFoundError: No module named 'snowflake.ingest'"},{"fix":"Upgrade to >=1.0.0: pip install --upgrade snowflake-ingest","cause":"Older version of the library (pre-1.0.0) used different class names.","error":"AttributeError: module 'snowflake.ingest' has no attribute 'SnowflakeIngestManager'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}