Skip to main content

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

  1. Install Snowflake CLI

    pip install snowflake-cli
    
  2. Install the Nextflow plugin

    pip install snowflake-cli-nextflow
    
  3. Configure Snowflake connection

    snow connection add
    

    Follow the prompts to configure your Snowflake connection

  4. Enable the Nextflow plugin

    snow plugin enable nextflow
    

    The nextflow command should now be available in the CLI.

Quick Start

  1. Prepare your Nextflow project

    Create a nextflow.config file in your project directory:

    // nextflow.config
    snowflake {
        computePool = 'YOUR_COMPUTE_POOL'
        workDirStage = 'WORKDIR_STAGE'
        stageMounts = 'INPUT:/mnt/input,OUTPUT:/mnt/output'
        driverImage = '/DB/SCHEMA/REPO/nf-snowflake:0.8.0'
    }
    
  2. Upload nf-snowflake image into snowflake image repository

    snow nextflow image push --source ghcr.io/snowflake-labs/nf-snowflake:0.8.0 --target nf_repo
    
  3. Run your workflow

    snow nextflow run /path/to/your/nextflow-project --profile snowflake
    
  4. 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'
    driverImage = '/DB/SCHEMA/REPO/nf-snowflake:0.8.0'
}

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.

  • driverImage (Required): The full path to the nf-snowflake image pushed to Snowflake registry. The version of the image should match the version specified in plugins section.

  • stageMounts (Optional): A comma-separated list of stage mounts in the format STAGE_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.

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

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

snowflake_cli_nextflow-0.1.2.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snowflake_cli_nextflow-0.1.2-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file snowflake_cli_nextflow-0.1.2.tar.gz.

File metadata

  • Download URL: snowflake_cli_nextflow-0.1.2.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for snowflake_cli_nextflow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9125e7142ae9f7dc00f214e0ded24f89aaf407cbf3b893af26cc730a2ffbb7d6
MD5 bcc7dca9017de216b81f47b996307866
BLAKE2b-256 6c721503f28c72edf6f830f93ce48a7765c50fa97ed09a03e7cfb69525998439

See more details on using hashes here.

Provenance

The following attestation bundles were made for snowflake_cli_nextflow-0.1.2.tar.gz:

Publisher: publish-to-pypi.yaml on Snowflake-Labs/snowflake-cli-nextflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file snowflake_cli_nextflow-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for snowflake_cli_nextflow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9486dd536e50ddf5664186ec1b1a9b1e230cff378f90abd4b26b3bd195d488a
MD5 92986144fac7dfd53e298ae743b3b20a
BLAKE2b-256 cc013441a668e043ce4f3ff3b42d646b3d14b4dd7725d3003705761fcd93d683

See more details on using hashes here.

Provenance

The following attestation bundles were made for snowflake_cli_nextflow-0.1.2-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on Snowflake-Labs/snowflake-cli-nextflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page