A Snowflake CLI plugin that enables running Nextflow workflows directly in Snowpark Container Services
Project description
Snowflake CLI Nextflow Plugin
A Snowflake CLI plugin that enables running Nextflow workflows directly in Snowpark Container Services.
Overview
This plugin extends the Snowflake CLI with Nextflow workflow capabilities, allowing you to:
- Run Nextflow workflows at scale using Snowflake's compute resources
- Stream live execution logs through secure WebSocket connections
- Manage workflow execution directly from your command line
- Leverage Snowflake's security and governance for bioinformatics and data pipelines
Key Features
- 🚀 Seamless Integration: Run Nextflow workflows directly in Snowpark Container Services
- 📊 Real-time Monitoring: Stream live logs and execution status via WebSocket
- 🔒 Enterprise Security: Built-in Snowflake authentication and authorization
- 🎯 Simple CLI Interface: Familiar command-line experience for workflow management
- 📦 Flexible Configuration: Support for Nextflow profiles and custom configurations
Getting Started
Prerequisites
- All prerequisites of running snowflake-cli mentioned here
- Access to a Snowflake account with Snowpark Container Services enabled
- A Snowflake compute pool configured for container workloads
Installation
-
Install Snowflake CLI
pip install snowflake-cli
-
Install the Nextflow plugin
pip install snowflake-cli-nextflow
-
Configure Snowflake connection
snow connection add
Follow the prompts to configure your Snowflake connection with appropriate credentials.
-
Enable the Nextflow plugin
snow plugin enable nextflow
The
nextflowcommand should now be available in the CLI.
Quick Start
-
Prepare your Nextflow project
Create a
nextflow.configfile in your project directory:// nextflow.config snowflake { computePool = 'YOUR_COMPUTE_POOL' workDirStage = 'WORKDIR_STAGE' stageMounts = 'INPUT:/mnt/input,OUTPUT:/mnt/output' }
-
Upload nf-snowflake image into snowflake image repository
snow nextflow image push --source ghcr.io/snowflake-labs/nf-snowflake:0.7.1 --target nf_repo --update-config
-
Run your workflow
snow nextflow run /path/to/your/nextflow-project -profile snowflake
-
Monitor execution
The plugin will automatically:
- Upload your project to Snowflake
- Submit the workflow to Snowpark Container Services
- Stream live logs to your terminal
Configuration
Snowflake-specific Configuration
Your nextflow.config must include the following Snowflake-specific settings:
plugins { id 'nf-snowflake@0.8.0' }
snowflake {
computePool = 'YOUR_COMPUTE_POOL'
workDirStage = 'WORKDIR_STAGE'
stageMounts = 'INPUT:/mnt/input,OUTPUT:/mnt/output'
}
Configuration Parameters
-
computePool(Required): The name of your Snowflake compute pool where the Nextflow containers will run. This compute pool must be configured with appropriate resources and permissions for container workloads. -
workDirStage(Required): The Snowflake stage name where the plugin will upload your workflow files and store execution artifacts. This stage serves as the working directory for your Nextflow execution. -
stageMounts(Optional): A comma-separated list of stage mounts in the formatSTAGE_NAME:/mount/path. Each mount makes a Snowflake stage available inside the container at the specified path. Use this to provide input data and collect output results.
Example with Multiple Stage Mounts
snowflake {
computePool = 'NEXTFLOW_POOL'
workDirStage = 'NF_WORKSPACE'
stageMounts = 'RAW_DATA:/mnt/input,RESULTS:/mnt/output,REFERENCES:/mnt/ref'
}
Usage Examples
Basic Workflow Execution
# Run with default profile
snow nextflow run ./my-workflow
# Run with specific profile
snow nextflow run ./my-workflow -profile snowflake
# Check available commands
snow nextflow --help
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Acknowledgments
- Nextflow - The workflow management system
- Snowflake - The cloud data platform
- Snowpark Container Services - Container orchestration platform
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snowflake_cli_nextflow-0.1.1.tar.gz.
File metadata
- Download URL: snowflake_cli_nextflow-0.1.1.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb402a70fa4d4c4471ee6da9c5612cb69e57ad979d283ac7e2c4fa6da7e25ae1
|
|
| MD5 |
cccf484588d6be2f5797d0d2743fd93a
|
|
| BLAKE2b-256 |
a69da604b14db8b7e09e4a1bce48b3fd99f6b22ae9a6fe829995350860d3624c
|
Provenance
The following attestation bundles were made for snowflake_cli_nextflow-0.1.1.tar.gz:
Publisher:
publish-to-pypi.yaml on Snowflake-Labs/snowflake-cli-nextflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snowflake_cli_nextflow-0.1.1.tar.gz -
Subject digest:
eb402a70fa4d4c4471ee6da9c5612cb69e57ad979d283ac7e2c4fa6da7e25ae1 - Sigstore transparency entry: 404082372
- Sigstore integration time:
-
Permalink:
Snowflake-Labs/snowflake-cli-nextflow@68c3bade39dc45bfc677dc9832127d04e2764fc4 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/Snowflake-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@68c3bade39dc45bfc677dc9832127d04e2764fc4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file snowflake_cli_nextflow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: snowflake_cli_nextflow-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0896487eadc4e0fbb5dce49156807f2e6528bfea7fbaf15d8601a97391ce2a6
|
|
| MD5 |
e6c03c3c194255e4b06470196f8d22e2
|
|
| BLAKE2b-256 |
971dc67de6dc95af3b02fe0e2f5abdad5a02ad3e5cc4e8c3cfeeb865b2e8fddf
|
Provenance
The following attestation bundles were made for snowflake_cli_nextflow-0.1.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on Snowflake-Labs/snowflake-cli-nextflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snowflake_cli_nextflow-0.1.1-py3-none-any.whl -
Subject digest:
b0896487eadc4e0fbb5dce49156807f2e6528bfea7fbaf15d8601a97391ce2a6 - Sigstore transparency entry: 404082382
- Sigstore integration time:
-
Permalink:
Snowflake-Labs/snowflake-cli-nextflow@68c3bade39dc45bfc677dc9832127d04e2764fc4 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/Snowflake-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@68c3bade39dc45bfc677dc9832127d04e2764fc4 -
Trigger Event:
release
-
Statement type: