looker-open-source / henry

A command line tool for Looker instance cleanup
MIT License
79 stars 27 forks source link

Explore counted as join when the name is different #24

Open moseleyi opened 4 years ago

moseleyi commented 4 years ago

If you use view_name in your explore like this:

explore: name {
    view_name: name2
}

Then in fetcher.py -> get_explore_join_stats we only remove the join if the name matches the explore name exactly.

all_joins.remove(explore.name)

The scopes returned by the API contain both the original explore name and the view name. Also the API returns view_name = name rather than name2, which doesn't match.