Join two or more tables

%3CLINGO-SUB%20id%3D%22lingo-sub-146291%22%20slang%3D%22en-US%22%3EJoin%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146291%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20guys%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20need%20your%20help.%20How%20can%20create%20a%20query%20to%20join%20a%20table%20%22ConfigurationChange%22%20and%20table%20%22Perf%22%20to%20know%20the%20%25%20of%20CPU%20with%20a%20condition%20to%20have%20the%20same%20Publisher.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20help%3C%2FP%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-146291%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146876%22%20slang%3D%22en-US%22%3ERe%3A%20Join%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146876%22%20slang%3D%22en-US%22%3ENuno%2C%20Queries%20that%20are%20not%20type%20specific%20are%20inefficient%20and%20harder%20to%20author%20as%20the%20type%20is%20not%20known%20to%20the%20query%20editor.%20Please%20refine%20from%20using%20queries%20that%20start%20with%20%22search%20*%22%20and%20use%20the%20table%20name%20instead.%20%3CBR%20%2F%3E%3CBR%20%2F%3EWe%20are%20not%20blocking%20it%20from%20the%20language%20as%20there%20are%20cases%20were%20it%20is%20needed%20but%20%22search%20*%22%20query%20could%20be%2010%20time%20longer%20than%20the%20same%20query%20with%20type%20specific.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146875%22%20slang%3D%22en-US%22%3ERe%3A%20Join%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146875%22%20slang%3D%22en-US%22%3E%3CP%3ESure%20you%20can%20join!%3C%2FP%3E%0A%3CP%3EJoin%20is%20a%20very%20important%20and%20useful%20and%20powerful%20part%20of%20the%20language.%20See%20all%20details%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.loganalytics.io%2Fdocs%2FLanguage-Reference%2FTabular-operators%2Fjoin-operator%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.loganalytics.io%2Fdocs%2FLanguage-Reference%2FTabular-operators%2Fjoin-operator%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3EMeir%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146670%22%20slang%3D%22en-US%22%3ERe%3A%20Join%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146670%22%20slang%3D%22en-US%22%3EWhat%20is%20the%20common%20field%20that%20these%20two%20tables%20should%20be%20joined%20on%3F%20Computer%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146669%22%20slang%3D%22en-US%22%3ERe%3A%20Join%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146669%22%20slang%3D%22en-US%22%3E%3CP%3EHello.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20reply%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20want%20to%20filter%20one%20query%20that%20find%20publisher%20%3D%20%22SAP%22%20and%20see%20the%20Percentage%20of%20CPU%20and%20order%20by%20asc.%20I%20only%20can%20do%20with%20join%20the%20the%20table%20perf%20that%20information%20give%20the%20the%20%25%20of%20CPU%20and%20the%20table%26nbsp%3B%3CSPAN%3EConfigurationChange%20that%20give%20the%20publisher%20%22SAP%22.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EOne%20example%3A%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E1%20-%20search%3C%2FSPAN%3E%3CSPAN%3E%20*%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20Publisher%20%3C%2FSPAN%3E%3CSPAN%3Econtains%3C%2FSPAN%3E%20%3CSPAN%3E%22SAP%22%20(this%20information%20is%20insert%20on%20the%20table%20Perf)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EJoin%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXO197779833%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E2%20-%20search%26nbsp%3B*%20%7C%20where%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3EObjectName%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E%26nbsp%3B%3D%3D%20%22Memory%22%20and%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3ECounterName%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E%26nbsp%3B%3D%3D%20%22%25%20Committed%20Bytes%20In%20Use%22%20%7C%20summarize%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3EUsedMemory%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3Eavg%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3ECounterValue%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E)%20by%20Computer%20%7C%20sort%20by%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3EUsedMemory%3C%2FSPAN%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO197779833%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22SpellingError%20SCXO197779833%22%3Edesc%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO197779833%22%3E%26nbsp%3B(this%20information%20in%20insert%20on%20the%20table%20ConfigurationData)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146645%22%20slang%3D%22en-US%22%3ERe%3A%20Join%20two%20or%20more%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146645%22%20slang%3D%22en-US%22%3EHi%20I%20am%20not%20quite%20sure%20what%20exactly%20you%20want%20to%20achieve.%20Can%20make%20a%20simple%20mockup%20how%20the%20first%20and%20the%20second%20table%20should%20look%20and%20how%20they%20should%20look%20after%20they%20are%20joined.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello guys

 

I need your help. How can create a query to join a table "ConfigurationChange" and table "Perf" to know the % of CPU with a condition to have the same Publisher.

 

Thank you for your help

 
5 Replies
Hi I am not quite sure what exactly you want to achieve. Can make a simple mockup how the first and the second table should look and how they should look after they are joined.

Hello.

 

Thank you for your reply

 

I want to filter one query that find publisher = "SAP" and see the Percentage of CPU and order by asc. I only can do with join the the table perf that information give the the % of CPU and the table ConfigurationChange that give the publisher "SAP". 

One example:

1 - search| where Publisher contains "SAP" (this information is insert on the table Perf)
Join

2 - search * | where ObjectName == "Memory" and CounterName == "% Committed Bytes In Use" | summarize UsedMemory = avg(CounterValue) by Computer | sort by UsedMemory desc (this information in insert on the table ConfigurationData)

What is the common field that these two tables should be joined on? Computer?

Sure you can join!

Join is a very important and useful and powerful part of the language. See all details here: https://docs.loganalytics.io/docs/Language-Reference/Tabular-operators/join-operator

 

Thanks,

Meir

Nuno, Queries that are not type specific are inefficient and harder to author as the type is not known to the query editor. Please refine from using queries that start with "search *" and use the table name instead.

We are not blocking it from the language as there are cases were it is needed but "search *" query could be 10 time longer than the same query with type specific.