PedramNavid / dbtpal

Neovim plugin for dbt
93 stars 8 forks source link

DbtRunAll command fails to run #13

Closed PedramNavid closed 4 months ago

PedramNavid commented 1 year ago

:DbtRunAll returns an error but lua require('dbtpal').run_all() works.

Odd because :DbtRun works fine. Might have something to do with a missing argument.

Error below:

Failed to run dbt command. Exit Code: 2

------------

dbt command failed: dbt --use-colors --printer-width=10 run  --profiles-dir /Users/pedram/.dbt --
project-dir /Users/pedram/projects/data/dbt_project
 ---- Press q to quit ----- 
[dbtpal] [DEBUG 16:40:08] ...im/site/pack/packer/start/dbtpal/lua/dbtpal/commands.lua:33: Building dbt command: dbt --use
-colors --printer-width=10 run  --profiles-dir /Users/pedram/.dbt --project-dir /Users/pedram/projects/clients/railway/da
ta/railway_dbt
[dbtpal] [TRACE 16:40:17] ...im/site/pack/packer/start/dbtpal/lua/dbtpal/commands.lua:7: dbtpal config: {
[dbtpal]   custom_dbt_syntax_enabled = true,
[dbtpal]   extended_path_search = true,
[dbtpal]   path_to_dbt = "dbt",
[dbtpal]   path_to_dbt_profiles_dir = "/Users/pedram/.dbt",
[dbtpal]   path_to_dbt_project = "/Users/pedram/projects/data/dbt_project",
[dbtpal]   pre_cmd_args = { "--use-colors", "--printer-width=10" },
[dbtpal]   protect_compiled_files = true
[dbtpal] }
[dbtpal] [DEBUG 16:40:17] ...im/site/pack/packer/start/dbtpal/lua/dbtpal/commands.lua:33: Building dbt command: dbt --use
-colors --printer-width=10 run --select  --profiles-dir /Users/pedram/.dbt --project-dir /Users/pedram/projects/data/dbt_project
cmpadden commented 4 months ago

I am unable to replicate this on a starter dbt project. Result of invoking DbtRunAll:

20:24:01  Running with dbt=1.7.8
20:24:01  Registered adapter: duckdb=1.7.2
20:24:01  Found 2 models, 4 tests, 0 sources, 0 exposures, 0 metrics, 391 macros, 0 groups, 0 semantic m
odels
20:24:01  
20:24:01  Concurrency: 1 threads (target='dev')
20:24:01  
20:24:01  1 of 2 START sql table model main.my_first_dbt_model  [RUN]
20:24:01  1 of 2 OK created sql table model main.my_first_dbt_model  [OK in 0.04s]
20:24:01  2 of 2 START sql view model main.my_second_dbt_model  [RUN]
20:24:02  2 of 2 OK created sql view model main.my_second_dbt_model  [OK in 0.05s]
20:24:02  
20:24:02  Finished running 1 table model, 1 view model in 0 hours 0 minutes and 0.17 seconds (0.17s).
20:24:02  
20:24:02  Completed successfully
20:24:02  
20:24:02  Done. PASS=2 WARN=0 ERROR=0 SKIP=0 TOTAL=2

 ---- Press q to quit ----- 
 ❯ dbt --version
Core:
  - installed: 1.7.8
  - latest:    1.7.8 - Up to date!

Plugins:
  - duckdb: 1.7.2 - Up to date!

Would be curious to know if you are still experiencing this issue.

PedramNavid commented 4 months ago

i must've fixed it! thank you