Skip to content

Commit

Permalink
Fix tracking bug for jinja sampling (#4048)
Browse files Browse the repository at this point in the history
fix jinja sampling for static parser

automatic commit by git-black, original commits:
  21a7b71
  • Loading branch information
Nathaniel May authored and iknox-fa committed Feb 8, 2022
1 parent 5da10a9 commit a945047
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions core/dbt/parser/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,7 @@ def render_update(self, node: ParsedModelNode, config: ContextConfig) -> None:
# if we took a jinja sample, compare now that the base node has been populated
if jinja_sample_node is not None and jinja_sample_config is not None:
result = _get_stable_sample_result(
jinja_sample_node,
jinja_sample_config,
node,
config
jinja_sample_node, jinja_sample_config, node, config
)

# if we took an experimental sample, compare now that the base node has been populated
Expand Down Expand Up @@ -278,11 +275,7 @@ def populate(

# the manifest is often huge so this method avoids deepcopying it
def partial_deepcopy(self):
return ModelParser(
deepcopy(self.project),
self.manifest,
deepcopy(self.root_project)
)
return ModelParser(deepcopy(self.project), self.manifest, deepcopy(self.root_project))


# pure function. safe to use elsewhere, but unlikely to be useful outside this file.
Expand Down Expand Up @@ -347,7 +340,7 @@ def _get_sample_result(
sample_node: ParsedModelNode,
sample_config: ContextConfig,
node: ParsedModelNode,
config: ContextConfig
config: ContextConfig,
) -> List[Tuple[int, str]]:
result: List[Tuple[int, str]] = []
# look for false positive configs
Expand Down

0 comments on commit a945047

Please sign in to comment.