-
Notifications
You must be signed in to change notification settings - Fork 960
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
adding preview/compile updates #3942
Conversation
✅ Deploy Preview for docs-getdbt-com ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mirnawong1!
@@ -54,7 +54,7 @@ To stay informed on IDE updates, read [dbt Cloud IDE release notes](/tags/ide), | |||
| **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, D, A,** and **•** appear to the right of your file or folder name and indicate the actions performed: <br /> <br /> - Unsaved **(•)** — The IDE detects unsaved changes to your file/folder<br /> - Modification **(M)** — The IDE detects a modification of existing files/folders<br /> - Added **(A)** — The IDE detects added files<br/> - Deleted **(D)** — The IDE detects deleted files. | |||
| **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE. <br /><br /> - Create or change branches<br /> - Commit or revert individual files by right-clicking the edited file<br /> - [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)<br /> - Execute git commands using the git button <br /> - Link to the repo directly by clicking the branch name | | |||
| **Project documentation** | Generate and view your [project documentation](/docs/collaborate/build-and-view-your-docs) for your dbt project in real-time. You can inspect and verify what your project's documentation will look like before you deploy your changes to production. | | |||
| **Preview and Compile button** | You can run your code against your data platform by clicking the [**Preview**](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section). Use the [**Compile**](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section) button in the IDE to generate executable SQL, which occurs locally within dbt. | | |||
| **Preview and Compile button** | You can run your code or selected code against your data platform by clicking the [**Preview**](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section) button. <br /> Use the [**Compile**](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section) button in the IDE to generate executable SQL, which occurs locally within dbt. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't quite right - the change isn't around letting users highlight a subset of code and preview just that selected subset. The change is that you can now preview a model using the actual context of that model, same as you would get when building it.
So this is more like: "You can compile or preview a snippet of dbt code, or one of your dbt models after editing and saving."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this, thank you!
@@ -83,7 +83,7 @@ The IDE features some delightful tools and layouts to make it easier for you to | |||
The console section, located below the File editor, includes various console tabs and buttons to help you with tasks such as previewing, compiling, building, and viewing the <Term id="dag" />. Refer to the following sub-bullets for more details on the console tabs and buttons. | |||
<Lightbox src="/img/docs/dbt-cloud/cloud-ide/ide-console-overview.jpg" width="100%" title="The Console section is located below the File editor and has various tabs and buttons to help execute tasks"/> | |||
|
|||
1. **Preview button —** When you click on the Preview button, it runs the SQL in the active file editor regardless of whether you have saved it or not and sends the results to the Results console tab. | |||
1. **Preview button —** When you click on the Preview button, it runs the SQL in the active file editor regardless of whether you have saved it or not and sends the results to the **Results** console tab. From dbt v1.6 or higher, you can preview a selected portion of saved or unsaved code by highlighting it and then clicking the **Preview** button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can highlight and run just that code with any dbt version.
2. **Compile button —** The **Compile** button compiles the saved or unsaved SQL code and displays it in the **Compiled Code** tab. From dbt version 1.6 onwards, when you save changes to a model, you can compile its code with the model's specific context. This context is similar to what you'd have when building the model and involves useful context variables like `{{ this }} `or `{{ is_incremental() }}`. | ||
|
||
|
||
Starting from dbt v1.6 or higher, after saving changes to a model, you can compile its code with the context of that model — same as you would get while building it — which includes context variables like `{{ this }}` or `{{ is_incremental() }}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
adding preview / compile updates from @StefanDBTLabs 's loom. this includes being able to preview/compile selected code (saved or unsaved)
for v1.6 and higher, preview defaults to --select model_name