Skip to content

Commit

Permalink
add jinja sampling to stable static parser (#3970)
Browse files Browse the repository at this point in the history
automatic commit by git-black, original commits:
  b501f43
  • Loading branch information
Nathaniel May authored and iknox-fa committed Feb 8, 2022
1 parent b12bb67 commit 5da10a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/dbt/parser/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ def render_update(self, node: ParsedModelNode, config: ContextConfig) -> None:
jinja_sample_node = deepcopy(node)
jinja_sample_config = deepcopy(config)
# rendering mutates the node and the config
super(ModelParser, model_parser_copy) \
.render_update(jinja_sample_node, jinja_sample_config)
super(ModelParser, model_parser_copy).render_update(
jinja_sample_node, jinja_sample_config
)

# update the unrendered config with values from the static parser.
# values from yaml files are in there already
Expand Down Expand Up @@ -329,7 +330,7 @@ def _get_stable_sample_result(
sample_node: ParsedModelNode,
sample_config: ContextConfig,
node: ParsedModelNode,
config: ContextConfig
config: ContextConfig,
) -> List[str]:
result: List[Tuple[int, str]] = _get_sample_result(sample_node, sample_config, node, config)

Expand Down

0 comments on commit 5da10a9

Please sign in to comment.