How phdata/snowpipe-cli works
Project type and purpose
• Snowpipe CLI is an open-source, Python-based command-line interface tool that wraps Snowflake’s Snowpipe REST API and provides extra utilities (file staging, ingestion and JWT generation).
• Its primary use case is to let users invoke Snowpipe operations (PUT, ingest) and generate JWTs from their terminal.
File structure
• Top-level artifacts:
• build.sh, pyproject.toml, setup.cfg, requirements.txt → packaging and build configuration
• example-config.yaml → sample YAML configuration for credentials
• src/snowpipe_cli/ → Python package
– __main__.py → entry point (enables python -m snowpipe_cli)
– snowpipe.py → core implementation of subcommands and API calls
• No separate “frontend” or “backend” directories; the project is a single CLI application structured as a Python module.
• Presence of a YAML config file implies a configuration‐driven architecture.
• Dependencies on the snowflake-ingest-python library for HTTP calls to Snowpipe.
README for additional insights
• Describes two main features:
a. Ingest local and staged files via Snowpipe REST endpoints
b. Generate ad-hoc JWT tokens
• Clarifies that the CLI supports subcommands and debug logging.