|
| 1 | +# Use cases for iteration of Snowflake Data Sources |
| 2 | + |
| 3 | +First of all, you must connect your Tinybird workspace with your Git repository using the [documentation about versions](https://www.tinybird.co/docs/production/working-with-version-control#connect-your-workspace-to-git-from-the-cli) |
| 4 | + |
| 5 | +### Create a Snowflake Data Source |
| 6 | + |
| 7 | +- Create the Snowflake Connection in your main tinybird workspace using Tinybird CLI, as explain in the [iteration documentation](https://www.tinybird.co/docs/ingest/snowflake). Snowflake connections reside always in the main branch. |
| 8 | +- Create a new git branch |
| 9 | +- Create a new Snowflake .datasource data file in the branch, as in the example PR. You shouldn't need fixtures as the Data Source will be populated from the connection, but you can add fixtures and/or tests if needed. |
| 10 | + - For information about Snowflake options read the [connector documentation](https://www.tinybird.co/docs/ingest/snowflake) |
| 11 | +- Commit your code and create a new PR/MR from the branch to `main` |
| 12 | +- Wait for CI. You can check in the temporary workspace branch (automatically created and named like `tmp_ci_*`) that everything works as expected. |
| 13 | +- Merge and wait for CD. Now you should have your Data Source in the main workspace, using the connection, and the temporary CI branch will be deleted. |
| 14 | + |
| 15 | +[Example Pull Request](https://github.com/tinybirdco/use-case-examples/pull/tbd) |
| 16 | + |
| 17 | + |
| 18 | +### Update Snowflake Data Source with a new column, with same connection |
| 19 | + |
| 20 | +- Create another git branch |
| 21 | +- Add the new column to the schema and query |
| 22 | +- Commit your code and create an ew PR from the branch to `main` |
| 23 | +- Wait for CI to finish. You can check in the temporary workspace branch (automatically created and named like `tmp_ci_*`) that everything works as expected. |
| 24 | +- Merge and wait for CD. Now you should have your Data Source updated in the main workspace, using the connection, and the temporary CI branch will be deleted. |
| 25 | + |
| 26 | +[Example Pull Request](https://github.com/tinybirdco/use-case-examples/pull/tbd) |
| 27 | + |
| 28 | +### Delete a Snowflake Data Source |
| 29 | + |
| 30 | +- Create another git branch |
| 31 | +- Remove the .datasource data file |
| 32 | +- Commit your code and create an ew PR from the branch to `main` |
| 33 | +- Wait for CI to finish. You can check in the temporary workspace branch (automatically created and named like `tmp_ci_*`) that everything works as expected. |
| 34 | +- Merge and wait for CD. Now you should have your Data Source updated in the main workspace, using the connection, and the temporary CI branch will be deleted. |
| 35 | + |
0 commit comments