Home  >  Article  >  Backend Development  >  Kusto Go API query from multiple tables

Kusto Go API query from multiple tables

WBOY
WBOYforward
2024-02-06 09:27:031019browse

Kusto Go API 从多个表查询

Question content

I am using Kusto API to query the logs in 2 tables, but they are in 2 different databases, which are located in different in a cluster and therefore have different endpoints (I cannot modify the cluster). I want to know if it is possible to query logs from two tables using Kusto API


Correct answer


No matter which client library/tool ​​you use, as long as you have The databases all have read permissions, so you can include references to databases in different clusters in the query text.

For example, run the following query against database database1 on cluster cluster1.westus:

union withsource = T
   Table1, // this is in 'database1' in 'cluster1.westus'
   cluster("cluster2.westus2").database("database2").Table2,
   cluster("cluster2.centralus").database("database3").Table3
| where Timestamp > ago(1h)
| summarize count() by T

The above is the detailed content of Kusto Go API query from multiple tables. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete