{"id":24576293,"url":"https://github.com/tdambrin/sf-push","last_synced_at":"2026-02-07T08:02:01.753Z","repository":{"id":220047734,"uuid":"749560641","full_name":"tdambrin/sf-push","owner":"tdambrin","description":"GitHub Action to push worksheets to Snowflake account(s)","archived":false,"fork":false,"pushed_at":"2024-11-07T06:00:20.000Z","size":501,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T17:05:25.625Z","etag":null,"topics":["git","snowflake","versioning"],"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/tdambrin.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-28T23:02:07.000Z","updated_at":"2024-11-07T05:57:55.000Z","dependencies_parsed_at":"2025-04-23T17:05:32.022Z","dependency_job_id":"03602c3f-f20d-4d6f-8150-8636f6266191","html_url":"https://github.com/tdambrin/sf-push","commit_stats":null,"previous_names":["tdambrin/sf-push"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tdambrin/sf-push","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdambrin%2Fsf-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdambrin%2Fsf-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdambrin%2Fsf-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdambrin%2Fsf-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdambrin","download_url":"https://codeload.github.com/tdambrin/sf-push/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdambrin%2Fsf-push/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29189675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["git","snowflake","versioning"],"created_at":"2025-01-23T22:38:23.474Z","updated_at":"2026-02-07T08:02:01.734Z","avatar_url":"https://github.com/tdambrin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/tdambrin/sf_git/assets/61944454/077aa882-95c2-4f61-a05d-64e8e156b266\" alt=\"sfgit logo\" width=\"30%\"\u003e\n\u003c/p\u003e\n\n[![image](https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:thomas.dambrin@gmail.com?subject=[GitHub]%20Snowflake%20Git%20Versioning)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Push your worksheets to Snowflake via GitHub Actions\n## sf-push\n\nThis composite action leverage the [sf_git](https://github.com/tdambrin/sf_git) package to **push your tracked worksheets to your Snowflake account(s).**\n\n## Getting started\n### Requirements\nWhat you need to set up smooth synchronization between your GitHub repository and your Snowflake account:\n- A snowflake account with password authentication\n- Account and authentication parameters set in your GitHub repository secrets\n- Worksheets previously fetched with the [sf_git](https://github.com/tdambrin/sf_git) CLI. This action uses the metadata created by this package.\n\n### 1. Set up your account and authentication parameters\n\nIn your GitHub repository secrets, set all three variables:\n- ACTIONS_SF_ACCOUNTS\n- ACTION_SF_USERNAMES\n- ACTION_SF_PASSWORDS\n\nTo push to several accounts, simply set the secrets to comma separated values while keep a consistency with the order.\n\nExemple:\n\n    ACTIONS_SF_ACCOUNTS: myaccount1.eu-west-1.aws, myaccount2.east-us-2.azure\n    ACTIONS_SF_USERNAME: John, Linda\n    ACTIONS_SF_PASSWORDS: johnSuperPassword, lindas_big_secret\n\n\u003e [!WARNING]  \n\u003e `The account ID to be configured is in the \u003caccount_name\u003e.\u003cregion\u003e.\u003ccloud\u003e format.`\n\nIf you are unsure about how to retrieve it for your snowflake account, you can run this query:\n\n```sql\nSHOW REGIONS;\n\nWITH \n    SF_REGIONS AS (SELECT * FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))),\n    INFOS AS (SELECT CURRENT_REGION() AS CR, CURRENT_ACCOUNT() AS CA)\nSELECT CONCAT(\n        LOWER(INFOS.CA),\n        '.',\n        SF_REGIONS.\"region\",\n        '.',\n        SF_REGIONS.\"cloud\"\n    ) AS account_id\nFROM INFOS LEFT JOIN SF_REGIONS ON INFOS.CR = SF_REGIONS.\"snowflake_region\";\n```\n\nUnfortunately, the _region_ is not always the same in the _SHOW REGIONS_ ouput. Please check and adapt the format comforming to the official [documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#non-vps-account-locator-formats-by-cloud-platform-and-region).\nFor example, eastus2 for Azure should actually be east-us-2.\n\n### 2. Fetch your worksheets locally and commit them\n\n\u003cimg src=\"./doc/images/first_fetch.png\" alt=\"Init worksheets\" width=\"800\"/\u003e\n\n\nFor more details, please refer to the related documentation in [sf_git README](https://github.com/tdambrin/sf_git/blob/main/README.md).\n\n### 3. Add the workflow to your repository\n\nAdd the following step to your .github/workflows yaml files:\n\n```yaml\njobs:\n  push-to-sf:\n    runs-on: ubuntu-latest\n      - name: Push to snowflake\n        id: push_sf\n        uses: tdambrin/sf-push@v2\n        env:\n          ACTION_SF_ACCOUNTS: ${{ secrets.ACTION_SF_ACCOUNTS }}\n          ACTION_SF_USERNAMES: ${{ secrets.ACTION_SF_USERNAMES }}\n          ACTION_SF_PASSWORDS: ${{ secrets.ACTION_SF_PASSWORDS }}\n        with:\n          worksheets_path: demo/worksheets/\n      - name: Print result\n        run: |\n          echo \"${{ steps.push_sf.outputs.upload_report }}\"\n```\n\n\u003e [!NOTE]  \n\u003e Make sure to replace your worksheets_path with the relative location (from root) where your worksheets are stored within your repository.\n\n### 4. Use it however you like\n\n#### Synchronize Snowflake accounts together\n\n![Sync accounts](./doc/images/sync_multiple.png)\n\n### Push local changes to Snowflake account(s)\n\n![Local to SF](./doc/images/local_to_accounts.png)\n\n### Synchronize your important worksheets\n\n![Important worksheets](./doc/images/important_worksheets.png)\n\n### More uses cases: be creative !\n\n## Policies\nFeedbacks and contributions are greatly appreciated. This GitHub Action was made to ease every day life for Snowflake \ndevelopers and promote version control as much as possible.\n\nFor questions, please feel free to reach out [by email](mailto:thomas.dambrin@gmail.com?subject=[GitHub]%20Snowflake%20Push).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdambrin%2Fsf-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdambrin%2Fsf-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdambrin%2Fsf-push/lists"}