Skip to content

[CT-1584] [Feature] New top level commands: interactive compile #6358

@ChenyuLInx

Description

@ChenyuLInx

Describe the feature(Updated Feb 9 after chatting with @aranke )

In dbt-rpc and dbt-server, we support using some kind of manifest object(in mem object for dbt-rpc and manifest.msgpack for dbt-server) that regenerated whenever a dbt project file got modified to to support interactive compile.
Here's the link of how it is done in dbt-rpc and dbt-server

For input options

One of the goals of creating such command is to get rid of the custom code we are doing in lib.py and dbt-server, and have dbt-server go through a proper interface in dbt-core for this functionalities. There are two main options we want to support

  1. --allow-introspection/--no-allow-introspection (name tbd)
  2. compile one existing model vs provide a --in-line(name tbd) option to allow user compile some code that's not attached to a specific model
    • the in line code supplied by user doesn't belong to a specific node in the current project, so we will have to create a temp node for it, resolve the ref/source/config, then do the compilation.(link)
    • for inline code things like {this} probably will be wrong
    • for a existing model we don't need to create a separate temp node

For output

  • all commands should log to stdout, and return the compiled code via the result object
  • for compile one mode, we should update the file in target dir

Other non functional requirement

  • We should have functional test test the input options
  • We should remove the existing code linked above to make the previous mentioned function happen or create followup ticket for removing them if directly removing those would cause issue downstream.

Metadata

Metadata

Assignees

Labels

clienhancementNew feature or requestpython_apiIssues related to dbtRunner Python entry point

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions