You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When analyzing Metabase queries with references to logical views (aka models), Macaw is passed a query with "sentinel" names in place of actual tables. In order for find-replace to work correctly, we treat such qualifiers as if they were missing, so that we can cascade down to the entry qualified by the actual table.
This trick currently relies on Metabase's naming convention, and could have false positives, or break if this convention changes.
A more robust solution would be to take a set of placeholder names to be treated like this. Checking membership in this set should also be faster than searching for substrings too.
The text was updated successfully, but these errors were encountered:
We can "red green" this by adding a test with what would currently be a false positive.
We should be able to pass this set via the opts map, perhaps under a key called something like :placeholder-tables.
In future we may want to replace this set with a mapping to the fully qualified columns (and their aliases) that are exposed by these placeholders. Or we could just do that from the start. Note that even regular tables could populate this list, which could fix some previously ambiguous cases.
When analyzing Metabase queries with references to logical views (aka models), Macaw is passed a query with "sentinel" names in place of actual tables. In order for find-replace to work correctly, we treat such qualifiers as if they were missing, so that we can cascade down to the entry qualified by the actual table.
This trick currently relies on Metabase's naming convention, and could have false positives, or break if this convention changes.
A more robust solution would be to take a set of placeholder names to be treated like this. Checking membership in this set should also be faster than searching for substrings too.
The text was updated successfully, but these errors were encountered: