2017-02-16 17 views
0

我想通過名稱限制特定的關聯依賴關係。我嘗試過使用leftsemijoin但這似乎並沒有像我期望的那樣工作,因爲它和我的內部連接相同的結果。檢查Application Insights Analytics查詢語言中是否存在另一個表中的常規方法是什麼?

requests 
| where timestamp >= ago(24h) 
| join kind=leftsemi (
    dependencies 
    | where name contains "MYDATABASENAME" 
) on operation_Id 
| summarize count() by tostring(parseurl(url).Path) 
| order by count_ desc 

我期待在接下來的的where-in語句,但我仍然不能確定這是否是某種預期的方式做什麼什麼一般在T-SQL的exists聲明。

+0

見http://stackoverflow.com/問題/ 42258994 /應用程序的見解,分析,做子選擇 –

回答

0

您應該可以使用let聲明來實現此目的。

0

實際上,爲了得到使用內在的語義,你應該使用inner join。從join的文件(在種類=內部分):

有一個在輸出用於匹配行的所有組合的行從左側和右側。

另外,因爲有一個在返回的表大小的限制,您可能希望限制的參加這樣的右側:

requests 
| where timestamp >= ago(24h) 
| join kind=inner (
    dependencies 
    | where name contains "MYDATABASENAME" 
    | project operation_Id 
) on operation_Id 
| summarize count() by tostring(parseurl(url).Path) 
| order by count_ desc 
相關問題