I have two tables in Azure one of which is a list of URLs and the other has only Domain Names. I want to be able to check if the the URLs in the URLtable "contains" the domain name from the DomainName_table. The "in" operator cannot be used since there will never be an exact match. Dummy tables below:
let DomainName_table= datatable (domainname: string)
[
"abc456",
"gmail"
]
|summarize domainlist = make_list(domainname);
let URLtable= datatable (URL: string)
[
"abc456/.com/ffsfd/sdfsdfds",
"gmail",//.com/sAFSfS"
"gmddail.com"///sAFfsdfsfSfS"
];
URLtable
| where URL in (DomainName_table)
I also tried to split the URL to extract the domain name :
let DomainName_table= datatable (domainname: string)
[
"abc456",
"gmail"
]
|summarize domainlist = make_list(domainname);
let URLtable= datatable (URL: string)
[
"https://abc456.com/ffsfd/sdfsdfds",
"https://gmail.com/sAFSfS"
"https://gmddail.com/sAFfsdfsfSfS"
];
URLtable
|extend split_url = split(URL,"/",2)//| project split_url
| where split_url in (DomainName_table)
This is also not a great way since it can also be "xyz.abc456.com" and it won't return a match. Will almost always return a 0 since the URL can never be an exact match.
Also there are no common columns between the two to use in a join. Basically a substring search on one column from the column of another table.
Can anyone please suggest how I can do this? Thank you for your KQL-fu.