title: Add source database name as column in row results for Kusto
body: <p>I have multiple Kusto databases in our cluster - each representing a continuous integration test run. I frequently like to search across multiple databases to see how widely an issue is occurring or when the issue first started happening.</p>
  
  <p>I'll do something like this:</p>
  
  <p><code>union (database('2018-08-*').['*InterestingTables'])
  | where Message has "Danger, Danger, Will Robinson!" | project OccurrenceTime,Message</code></p>
  
  <p>I get a great overview, but no way to know which database each row came from. The Message itself doesn't tell me enough to know if two adjacent rows are from the same environment or separate ones.</p>
  
  <p>Is there a way to extend this with an additional column of which database and/or table the row came from before it was joined?</p>
  
  <p>In Kusto Explorer, I'm looking at writing a function of some sort that will enumerate the databases one by one, filtering to the interesting rows, extending the row with the current DB, then union'ing them all together.   I'm hoping there's an easier way to do this.  Thinking through the pipeline it seems like it's too late by the time the union has been done - unless Kusto is carrying that info around in metadata I haven't found yet.   This would be a lot easier via the CLI, but I'd prefer something that works in the Explorer.</p>
  
  <p>What I'm after is a little like <code>$table</code> in a <a href="https://kusto.azurewebsites.net/docs/queryLanguage/query_language_searchoperator.html" rel="nofollow noreferrer"><code>search</code></a> result.</p>
  
  <p>I've also tried <code>| extend cursor_current()</code> to see if it added anything interesting but that doesn't work in a cross-database scope.</p>
  
  <p>I've been through the <a href="https://kusto.azurewebsites.net/docs/queryLanguage/query-essentials/readme.html" rel="nofollow noreferrer">Query Language/Query Essentials</a> pretty exhaustively, though may have missed it due to... well, exhaustion. :)</p>