I’m working on a Looker project with two main datasets:
- Table A: Contains only id values and other related data.
- Table B: Maps id values to human-readable name values (e.g., id-name).
My goal is to allow users to filter the data in Table A using a concatenated id-name field from Table B (e.g., 1234-Example Name). The id-name field is only for UI purposes; the actual filtering needs to happen on the id.
Here’s what I have so far:
I created a LookML filter dimension in the view for Table A, which fetches id-name in the Looker UI. However, when I apply the filter, I get SQL like this:
(table_a.website_name) = '12345 - example.com'
The issue is that website_name does not exist in Table A—it only has id.
Questions:
- How can I set up the filter so that it uses the id-name from Table B for UI purposes, but correctly filters Table A based on the id?
- Is there a way to dynamically fetch and apply the id from Table B without joining the tables directly in LookML?
Any help or suggestions would be greatly appreciated! Thank you!
select * from table_a where table_a.website_id in (select website_id from table_b where table_b.website_name='12345 - example.com')where website_id_name = '12345 - example.com'i tried to have something like this but i couldn't achieve such a thingwhere website_id = SPLIT('12345 - example.com','-')[OFFSET(0)]example.com? Please show data example.