-
Notifications
You must be signed in to change notification settings - Fork 6
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
Test compatibility with "dbt Power User" VS Code Extension #321
Comments
@aaronsteers so far I was able to install the extension and get it to detect my project and files. I had to point it to my profiles and set file associations of So I get some features, based on there list on the github page https://github.com/innoverio/vscode-dbt-power-user but I'm not able to hit the run button:
If I change my python interpreter to use my
I don't see a way where we'd be able to prefix the commands that it wants to run when I click the run button. You can add something to the end of the command like I configured it to add
The vs code settings that ended up getting configured were:
Overall I'd say this is pretty good coverage and would recommend it to people using Meltano. They still need to execute via the CLI but the IDE experience is upgraded significantly. |
@pnadolny13 - This is super helpful. Thank you!
Nm. I see you have it documented here 😄 :
Re:
So, sounds like we have two docs issues and one bug/usability fix:
Does that sound about right in terms of making this generally available for Meltano users? (Ignoring questions of low/hi priority for now.) This is really great. I agree this would provide value for Meltano users as-is. That said, the experience as of now is admittedly not as good or streamlined as the native dbt experience. And (at least over time), I think we should try to smooth those rough edges as much as is feasible. |
@z3z1ma made https://github.com/z3z1ma/dbt-osmosis which seems really cool and could be another option @pnadolny13 @aaronsteers |
@aaronsteers yeah that seems right.
This would be easy for the first iteration where "run" doesnt work but the other features do.
I think these 2 could end up being the same solution. Switching interpreters doenst really solve anything for me yet, it finds dbt but until I can run dbt with meltano its not much help because none of my configs flow through. Also I got all the other features without configuring my python interpreter with dbt so that seems to only be used for the "run" featyre. Ideally we'd find a way to be able run dbt through meltano, until then the other 2 settings I listed give you everything except "run". I wonder if the maintainers would accept a PR to configure your dbt executable, wouldnt that allow us to replace |
@tayloramurphy dbt-osmosis does look awesome! I've been starting to play around with it today. I think it would be in addition to this VS code extension though, not as a replacement. I saw this snippet in the readme:
So I dont think its intending to be the IDE itself but more of a developer utility along side the IDE. @z3z1ma definitely correct me if I'm wrong though! |
Yeah - I like this idea a lot! Logged an issue: |
@pnadolny13 - Another path here is to modify the venv This is not ideal though for a number of reasons which I won't get into... Possible venv-based workaround (not advised)Ignoring for a second all the reasons it would be less-than-ideal...
# ...
source $MELTANO_PROJECT_ROOT/.env Or, imagining a new command # ...
source $MELTANO_PROJECT_ROOT/.env
if [[ -e MELTANO_ENVIRONMENT ]]; then
meltano --environment=$MELTANO_ENVIRONMENT config dbt-snowflake --format=dotenv | source - |
The extension author has replied to the above and it sounds like they are open to adding a CLI-based invocation pattern which could accept a different dbt executable entrypoint.
Looks like this line of code is helpful to understand the invocation pattern. Looks like they basically already use CLI-esque invocation syntax but it is passed via a Python interface: private dbtCommand(cmd: string | string[]): string {
return `import dbt.main; dbt.main.main([${cmd}])`;
} |
Yep that's right. We scope the utility in the purposefully narrow (but important) developer-workflow gap that VS Code fails at for a dbt developer. So I use it in addition- it will not handle saving files or navigating the file system. It will excel at taking any dbt model you are working on (or any SQL at all) at any level of complexity and allow you to dive into an instant-feedback loop of type, adjust, test, etc. whenever you want so long as its open/running in a tab. |
For future readers' reference, this shipped after we closed this issue: Some of the above could likely be improved by using relative path option to invoke dbt via meltano (which theoretically would also get any needed secrets). |
@pnadolny13 - Did you find a workaround to |
As @DouweM mentions, we want Meltano to be the best way to run dbt.
In order to reach that goal, we must be compatible with the current best-in class IDE experience from third parties.
@pnadolny13 - Can you please use
squared
to try out the dbt Power User extension in VS Code?When I tried using this with a meltano project previously, the plugin was not able to detect my models and the basic features did not work because of Meltano's own changes to base directory, working directory, etc. However, it's possible that the extension has improved, and it's possible that there are workarounds.
What I had to do:
dbt_project.yml
to the base of the repo.Again, these workarounds may no longer be needed but we should know if we are compatible and what workarounds if any, are needed to get the extension working on a Meltano project?
cc @tayloramurphy
The text was updated successfully, but these errors were encountered: