Home > front end >  Generate list of fields for tables in workspace with getschema
Generate list of fields for tables in workspace with getschema

Time:05-05

Is it possible to get a variant of the following to work. The objective is to list all of the table names in a workspace and in the adjacent column in a field list the fields in that table. I am getting an error with the "table" function " table(): argument #1 must be a non-empty string literal." I ran this with https://dataexplorer.azure.com/clusters/help/databases/SampleLogs.

let foo = (tableName:string)
{
    table(tableName) | getschema | summarize make_list(ColumnName)
};
search *
| summarize count() by Table = $table
| extend fields= foo(Table)

CodePudding user response:

in Azure Data Explorer (which doesn't have the notion of a 'workspace', rather a 'database') - you can achieve this using the .show database schema control command.

  • Related