-
Notifications
You must be signed in to change notification settings - Fork 395
Docs: add examples section overview page #3388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Overview | ||
|
|
||
| Realistic examples are a fantastic way to understand SQLMesh better. | ||
|
|
||
| They allow you to tinker with a project's code and data, issuing different SQLMesh commands to see what happens. | ||
|
|
||
| You can reset the examples at any time, so if things get turned around you can just start over! | ||
|
|
||
| This page links to a few different types of examples: | ||
|
|
||
| - **Walkthroughs** pose a specific story or task, and you follow along as we work through the story | ||
| - Walkthroughs **do not** require running code, although the code is available if you would like to | ||
| - Different walkthroughs use different SQL engines, so if you want to run the code you might need to update it for your SQL engine | ||
| - **Projects** are self-contained SQLMesh projects and datasets | ||
| - Projects generally use DuckDB so you can run them locally without installing or accessing a separate SQL engine | ||
|
|
||
| !!! tip | ||
|
|
||
| If you haven't tried out SQLMesh before, we recommending working through the [SQLMesh Quickstart](../quick_start.md) before trying these examples! | ||
|
|
||
| ## Walkthroughs | ||
|
|
||
| We're proud to present our very first walkthrough, an in-depth description of incremental by time models: | ||
|
|
||
| - [Incremental by time: full walkthrough](./incremental_time_full_walkthrough.md) (BigQuery SQL engine) | ||
|
|
||
| ## Projects | ||
|
|
||
| SQLMesh example projects are stored in the [sqlmesh-examples Github repository](https://github.com/TobikoData/sqlmesh-examples). The repository's front page includes additional information about how to download the files and set up the projects. | ||
|
|
||
| The two most comprehensive example projects use the SQLMesh `sushi` data, based on a fictional sushi restaurant. ("Tobiko" is the Japanese word for flying fish roe, commonly used in sushi.) | ||
|
|
||
| The `sushi` data is described in an [overview notebook](https://github.com/TobikoData/sqlmesh-examples/blob/main/001_sushi/sushi-overview.ipynb) in the repository. | ||
|
|
||
| The example repository include two versions of the `sushi` project, at different levels of complexity: | ||
|
|
||
| - The [`simple` project](https://github.com/TobikoData/sqlmesh-examples/tree/main/001_sushi/1_simple) contains four `VIEW` and one `SEED` model | ||
| - The `VIEW` model kind refreshes every run, making it easy to reason about SQLMesh's behavior | ||
| - The [`moderate` project](https://github.com/TobikoData/sqlmesh-examples/tree/main/001_sushi/2_moderate) contains five `INCREMENTAL_BY_TIME_RANGE`, one `FULL`, one `VIEW`, and one `SEED` model | ||
| - The incremental models allow you to observe how and when new data is transformed by SQLMesh | ||
| - Some models, like `customer_revenue_lifetime`, demonstrate more advanced incremental queries like customer lifetime value calculation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.