{"id":34035827,"url":"https://github.com/tilakpatidar/pytest-snowflake_bdd","last_synced_at":"2026-04-02T17:28:26.027Z","repository":{"id":62584196,"uuid":"439246564","full_name":"tilakpatidar/pytest-snowflake_bdd","owner":"tilakpatidar","description":"Setup test data and run tests on snowflake in BDD style!","archived":false,"fork":false,"pushed_at":"2022-01-05T17:56:02.000Z","size":61,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T11:41:50.723Z","etag":null,"topics":["bdd","bdd-framework","pytest","pytest-plugin","snowflake","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilakpatidar.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-17T07:26:01.000Z","updated_at":"2024-07-08T12:43:39.000Z","dependencies_parsed_at":"2022-11-03T22:17:48.950Z","dependency_job_id":null,"html_url":"https://github.com/tilakpatidar/pytest-snowflake_bdd","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tilakpatidar/pytest-snowflake_bdd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilakpatidar%2Fpytest-snowflake_bdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilakpatidar%2Fpytest-snowflake_bdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilakpatidar%2Fpytest-snowflake_bdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilakpatidar%2Fpytest-snowflake_bdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilakpatidar","download_url":"https://codeload.github.com/tilakpatidar/pytest-snowflake_bdd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilakpatidar%2Fpytest-snowflake_bdd/sbom","scorecard":{"id":885215,"data":{"date":"2025-08-11","repo":{"name":"github.com/tilakpatidar/pytest-snowflake_bdd","commit":"db49f0a6d844828b607a2717b96bba517995cf72"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/tilakpatidar/pytest-snowflake_bdd/main.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:69","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T09:45:48.736Z","repository_id":62584196,"created_at":"2025-08-24T09:45:48.736Z","updated_at":"2025-08-24T09:45:48.736Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31311551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd","bdd-framework","pytest","pytest-plugin","snowflake","testing"],"created_at":"2025-12-13T20:04:34.967Z","updated_at":"2026-04-02T17:28:26.019Z","avatar_url":"https://github.com/tilakpatidar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pytest-snowflake_bdd\n--------------------\n.. image:: https://img.shields.io/pypi/v/pytest-snowflake_bdd.svg\n    :target: https://pypi.org/project/pytest-snowflake_bdd\n    :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-snowflake_bdd.svg\n    :target: https://pypi.org/project/pytest-snowflake_bdd\n    :alt: Python versions\n\nSetup test data and run tests on snowflake in BDD style!\n\n--------------------\n\nFeatures\n--------\n\nProvides `pytest-bdd`_ step definitions for testing snow-sql scripts against a snowflake account.\n\n\n\nInstallation\n------------\n\nYou can install \"pytest-snowflake_bdd\" via `pip`_.\n\n    $ pip install pytest-snowflake-bdd\n\n\nUsage\n-----\n\nThis plugin relies on `pytest-bdd`_ to run bdd tests.\n\nYou can pass your snowflake account details using the cli arguments to pytest command.\n\n.. code:: shell\n\n    custom options:\n      --snowflake-user=SNOWFLAKE_USER\n                            snowflake user for test environment\n      --snowflake-password=SNOWFLAKE_PASSWORD\n                            snowflake password for test environment\n      --snowflake-account=SNOWFLAKE_ACCOUNT\n                            snowflake password for test environment\n      --snowflake-role=SNOWFLAKE_ROLE\n                            optional snowflake role for test environment\n      --snowflake-warehouse=SNOWFLAKE_WAREHOUSE\n                            optional snowflake warehouse for test environment\n\n\nBelow example illustrates the usage of step definitions provided by the plugin.\n\n.. code:: gherkin\n\n   Feature: ExampleFeature for snowflake testing\n\n     Scenario: example_scenario\n       Given a snowflake connection\n       When a temporary table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.DEPARTMENT\" has\n         | dept_id: INTEGER | dept_name: STRING      |\n         | 1                | \"Computer Science\"     |\n         | 2                | \"Software Engineering\" |\n       When a temporary table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.PEOPLE\" has\n         | people_id: INTEGER | name: STRING | dept_id: INTEGER |\n         | 10                 | \"tilak\"      | 1                |\n       Then a sql script \"./sql/example.sql\" runs and the result is\n         | people_id: INTEGER | name: STRING | dept_id: INTEGER | dept_name: STRING  |\n         | 10                 | \"tilak\"      | 1                | \"Computer Science\" |\n\n\n- ``dept_id: INTEGER``. ``dept_id`` is the column name and ``INTEGER`` is the snowflake data type.\n- The step ``a temporary table called \"\u003cfully_qualified_table_name\u003e\" has``\n\n  Replaces the existing table with a `temporary` table. And adds data to the temporary table. This shadows the existing\n  table in snowflake for the entire session. Any changes done to the temporary table does not reflect on the actual\n  database. If the table does not exists creates a new temporary table.\n- The step ``Then a sql script \"\u003csql_script_path\u003e\" runs and the result is``\n  This runs the sql script and compares the output with given dataframe.\n\n\nAvailable Step definitions\n---------------------------\n\n**Creating a new snowflake session**\n\n\n.. code:: gherkin\n\n    Given a snowflake connection\n\n**Setting up a temporary snowflake table for test**\n\n* Replaces the existing table with a `temporary` table. And adds data to the temporary table. This shadows the existing\n  table in snowflake for the entire session. Any changes done to the temporary table does not reflect on the actual\n  database. If the table does not exists creates a new temporary table.\n\n.. code:: gherkin\n\n    When a temporary table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.DEPARTMENT\" has\n     | dept_id: INTEGER | dept_name: STRING      |\n     | 1                | \"Computer Science\"     |\n     | 2                | \"Software Engineering\" |\n\n\n**Setting up a snowflake table for test**\n\n* Creates a normal table. Will fail if table already exists.\n\n.. code:: gherkin\n\n    When a table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.DEPARTMENT\" has\n     | dept_id: INTEGER | dept_name: STRING      |\n     | 1                | \"Computer Science\"     |\n     | 2                | \"Software Engineering\" |\n\n**Running a sql script and validating results**\n\n.. code:: gherkin\n\n    Then a sql script \"./sql/example.sql\" runs and the result is\n      | people_id: INTEGER | name: STRING | dept_id: INTEGER | dept_name: STRING  |\n      | 10                 | \"tilak\"      | 1                | \"Computer Science\" |\n\n**Representing null in table data**\n\nUse ``{null}``\n\n.. code:: gherkin\n\n      | people_id: INTEGER | name: STRING | dept_id: INTEGER | dept_name: STRING  |\n      | 10                 | \"tilak\"      | 1                | {null} |\n\n\n**Stubbing current time related functions**\n\nSupports stubbing the following functions with the fixture value.\n\ncurrent_timestamp, localtimestamp, getdate, systimestamp, sysdate, current_time, localtime\n\nThese functions will be replaced in the sql query by statements like\n``CAST ('2022-01-05 04:12:17' as TIMESTAMP)`` or ``CAST ('04:12:17' as TIME)``\n\n.. code:: gherkin\n\n   Feature: ExampleFeature for snowflake testing\n\n     Scenario: example_scenario\n       Given a snowflake connection\n       And current timestamp \"2022-01-05 04:12:17\"\n       And current time \"04:12:17\"\n       When a temporary table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.DEPARTMENT\" has\n         | dept_id: INTEGER | dept_name: STRING      |\n         | 1                | \"Computer Science\"     |\n         | 2                | \"Software Engineering\" |\n       When a temporary table called \"SNOWFLAKE_LIQUIBASE.PUBLIC.PEOPLE\" has\n         | people_id: INTEGER | name: STRING | dept_id: INTEGER |\n         | 10                 | \"tilak\"      | 1                |\n       Then a sql script \"./sql/example.sql\" runs and the result is\n         | people_id: INTEGER | name: STRING | dept_id: INTEGER | dept_name: STRING  |\n         | 10                 | \"tilak\"      | 1                | \"Computer Science\" |\n\n\n**Representing different data types in table**\n\n.. code:: gherkin\n\n   | a: CHAR | b: CHARACTER | c: STRING | d: TEXT | e: BINARY | f: VARBINARY |\n   | sample  | sample       | sample    | sample  | sample    | sample       |\n\n   | a: FLOAT | b: DOUBLE | c: INT | d: INTEGER | e: BIGINT | f: SMALLINT | g: TINYINT | h: BYTEINT |\n   | 1.0      | 1.0       | 1      | 1          | 1         | 1           | 1          | 1          |\n\n   | a: DATE    | b: DATETIME         | c: TIME  | d: TIMESTAMP        |\n   | 2021-05-05 | 2021-05-05 01:35:00 | 01:35:00 | 2021-05-05 01:35:00 |\n\nUnderstanding data-type mismatch errors\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFor assertion of tables we are using pandas. Differences are shown\nin-terms of pandas dataframe.\n\nBelow snowflake to pandas type table can help in understanding the\nerrors:\n\n================== ===============\nSnowflake datatype Pandas datatype\n================== ===============\nBIGINT             int64\nBINARY             bytes\nBOOLEAN            bool\nCHAR               str\nCHARACTER          str\nDATE               object\nDATETIME           object\nDEC                object\nDECIMAL            object\nDOUBLE             float64\nFIXED              object\nFLOAT              float64\nINT                int64\nINTEGER            int64\nNUMBER             object\nREAL               float64\nBYTEINT            int64\nSMALLINT           int64\nSTRING             str\nTEXT               str\nTIME               object\nTIMESTAMP          object\nTINYINT            int64\nVARBINARY          bytes\nVARCHAR            str\n================== ===============\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-snowflake_bdd\" is free and open source software\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`file an issue`: https://github.com/tilakpatidar/pytest-snowflake_bdd/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`pytest-bdd`: https://pypi.org/project/pytest-bdd/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilakpatidar%2Fpytest-snowflake_bdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilakpatidar%2Fpytest-snowflake_bdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilakpatidar%2Fpytest-snowflake_bdd/lists"}