Skip to content

Add support for ephemeral models#90

Open
PaddyAlton wants to merge 1 commit into
lightdash:mainfrom
PaddyAlton:57-issue-parsing-ephemeral-models
Open

Add support for ephemeral models#90
PaddyAlton wants to merge 1 commit into
lightdash:mainfrom
PaddyAlton:57-issue-parsing-ephemeral-models

Conversation

@PaddyAlton
Copy link
Copy Markdown

This PR fixes the dbt2looker tool such that ephemeral models do not break it (see issue #57).

It is inspired by earlier suggestions by @boludo00 and @mariana-s-fernandes , with minor modifications.

Copy link
Copy Markdown
Collaborator

@owlas owlas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good! just a request to move the tag feature to a separate PR

Comment thread dbt2looker/parser.py
Comment thread dbt2looker/parser.py Outdated
if node.resource_type == 'model' and node.config['materialized'] != 'ephemeral'
]

if tag is None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove the tag feature from this PR and we can address it separately?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you mean, sorry?

This line isn't doing anything new, it's just some light refactoring for clarity (lines 46-48 previously did this filtering).

I guess I have changed the order in which things happen - previously, an error would have been raised for any model that didn't have a name attribute, whereas now (because I've put the filtering before the for-loop) only selected models (ones where the tag matches) that don't have a name attribute will throw the error, the rest will be ignored.

Can you confirm that this behavioural change is what you want me to revert?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@owlas I assumed that this is what you wanted, I've fiddled with it to remove the behavioural change, which I will include in a new PR shortly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done - there are now three PRs in a stack:

@PaddyAlton
Copy link
Copy Markdown
Author

Hi @owlas - just checking whether my revisions following your review got lost in the churn?

There are three small PRs in a stack:

No particular rush, but thought I'd check this was on your radar.

@PaddyAlton
Copy link
Copy Markdown
Author

@owlas - just a gentle nudge, any chance of merging these contributions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants