I want to have a custom dimension that allows me to merge two dimensions in an explore that are both from different views. For instance the SQL query below is what I ultimately want to get in Looker:
HV.STARTTIME AND A.LASTUPDATE are both using the time formats and are part of different tables, so how could I get create a dimension that will cover for the AND logic below where it specified that I want to use HV.STARTTIME AND A.LASTUPDATE
SELECT DISTINCT A.DEVICE_ID, HV.VULN_ID FROM TABLE.HOST_VULNERABILITIES HV
INNER JOIN TABLE2.AGENT A ON A.DEVICE_ID = HV.DEVICE_ID
WHERE A.STATUS = 'ACTIVE'
AND (HV.STARTTIME >= '2024-11-04 00:00:00.000' AND HV.STARTTIME <= '2024-11-04 23:00:00.000') AND (A.LASTUPDATE >= '2024-11-04 00:00:00.000' AND A.LASTUPDATE <= '2024-11-04 23:59:59.000') ORDER BY DEVICE_ID DESC;
I might be missing something here, but is there a reason why you cannot just use an 'AND' filter with each of these fields independently in the front end, assuming these two views are joined in the explore?