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

Fix manifest search (#2032) #2035

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Commits on Jan 29, 2020

  1. More macro search changes

    Unify the lookup for the various macros, all of them are done in the manifest now:
     - dbt's built-in package + all plugins are part of 'core'
     - finding macros has the concept of an optional package name
     - materializations are a special case of finding macros
     - the `generate_*_name` macros are another special case (non-core dependency packages are ignored)
     - generating the macro execution context now uses the concept of an optional search_package_name
     - macro execution now binds these two together
    
    Unify the lookup for models/docs/sources
     - added a search_name property to those three types
     - create a 'Searchable' protocol, have the node search code accept that
     - simplify matching logic/push it into the correct types accordingly
    
    Rename get_materialization_macro to find_materialization_macro_by_name (consistency)
    
    context namespacing behavior:
     - dbt run-operation now passes the named package along to macro execution if a package name is specified
     - so `dbt run-operation dependency.ad` runs with the dependency namespace as local, overriding globals
     - but `dbt run-operation my_macro` runs in the current package namespace as local, even if it ultimately runs the dependency's my_macro()
     - the current package namespace is always treated as "global", overriding core macros
    
    Tons of tests
    Jacob Beck committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    62755fe View commit details
    Browse the repository at this point in the history