Skip to content
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

Merged
merged 12 commits into from
Aug 24, 2023
Merged

adding preview/compile updates #3942

merged 12 commits into from
Aug 24, 2023

Conversation

mirnawong1
Copy link
Contributor

@mirnawong1 mirnawong1 commented Aug 17, 2023

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

@mirnawong1 mirnawong1 requested a review from a team as a code owner August 17, 2023 15:38
@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for docs-getdbt-com ready!

Name Link
🔨 Latest commit e1e6f2c
🔍 Latest deploy log https://app.netlify.com/sites/docs-getdbt-com/deploys/64e75bcf05eca00007f44a2d
😎 Deploy Preview https://deploy-preview-3942--docs-getdbt-com.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs size: x-small This change will take under 3 hours to fix. labels Aug 17, 2023
Copy link
Collaborator

@jtcohen6 jtcohen6 left a 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 **(•)** &mdash; The IDE detects unsaved changes to your file/folder<br /> - Modification **(M)** &mdash; The IDE detects a modification of existing files/folders<br /> - Added **(A)** &mdash; The IDE detects added files<br/> - Deleted **(D)** &mdash; 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. |
Copy link
Collaborator

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."

Copy link
Contributor Author

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 &mdash;** 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 &mdash;** 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.
Copy link
Contributor

@StefanDBTLabs StefanDBTLabs Aug 24, 2023

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.

Comment on lines 98 to 101
2. **Compile button &mdash;** 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() }}`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@mirnawong1 mirnawong1 merged commit d1bf7f7 into current Aug 24, 2023
11 checks passed
@mirnawong1 mirnawong1 deleted the mwong-ide-selection branch August 24, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants