Skip to main content

Capture and validate stored procedure baselines during database migrations to Snowflake

Project description

snowflake-snowconvert-testing-orchestration

Capture and validate stored procedure baselines during database migrations to Snowflake. Part of the SnowConvert migration toolchain.

What it does

When migrating stored procedures from SQL Server, Oracle, or other platforms to Snowflake, this tool automates the verification process:

  1. Capture -- Execute stored procedures on the source database and save their results as baseline files.
  2. Validate -- Execute the same procedures on Snowflake and compare the results against the captured baselines.
  3. Report -- Generate detailed validation reports covering schema, metrics, and row-level comparisons.

Installation

pip install snowflake-snowconvert-testing-orchestration

Quick start

Capture baselines from source

test-runner capture --project-root /path/to/project

Validate on Snowflake

test-runner validate --project-root /path/to/project -c my_snowflake_connection

Configuration

Create a settings/test_config.yaml in your project directory:

source_platform: sqlserver
target_platform: snowflake

source_connection:
  mode: credentials
  host: 127.0.0.1
  port: 1433
  database: testdb
  username: sa
  password: "your-password"

target_connection:
  mode: name
  name: your_snowflake_connection

validation_configuration:
  schema_validation: true
  metrics_validation: true
  row_validation: true

Define test cases for each procedure in artifacts/<database>/<schema>/procedure/<Name>/test/<name>.yml:

validation:
  source:
    steps:
      run: |-
        EXECUTE testdb.dbo.GetAllProducts
  target:
    steps:
      run: |-
        CALL TESTDB.DBO.GETALLPRODUCTS()
  test_cases:
    - []

Library usage

from test_runner import create_container, run_capture, run_validate

container = create_container("my_project")
config = container.config()
registry = container.factory_registry()

capture_stats = run_capture(config=config, factory_registry=registry, project_root="my_project")
validate_stats = run_validate(config=config, factory_registry=registry, project_root="my_project")

Requirements

  • Python >= 3.10
  • Access to a source database (SQL Server, Oracle, etc.)
  • A Snowflake account with SnowSQL or connector configuration

Related packages

License

Snowflake Conversion Software Terms

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

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

File details

Details for the file snowflake_snowconvert_testing_orchestration-0.1.11.tar.gz.

File metadata

File hashes

Hashes for snowflake_snowconvert_testing_orchestration-0.1.11.tar.gz
Algorithm Hash digest
SHA256 2085c9c1408ebe9a33de94c08c1241dc543211c83cc29530b474f5fb19c49e0f
MD5 069596b24ffcb61c5b6a18fcf9fdfae1
BLAKE2b-256 d3ac1448ce776eda39a3673ca92c0bd4ec5a2c5d83884779353f689e0931bad2

See more details on using hashes here.

File details

Details for the file snowflake_snowconvert_testing_orchestration-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for snowflake_snowconvert_testing_orchestration-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ccf8ee71d52d481a773c0adb81c712e7afc7a7cdcb774685a3bb6dd740672e5a
MD5 c8492216ccd5c58d4783c3bbae810e7d
BLAKE2b-256 32e06535b51d6e1b3f6c88a042713377b7886acdaa734c0436db2afa21142327

See more details on using hashes here.

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