append/ingest .show command (save db size over time)

Copper Contributor

I'm trying to save my DB size over time via a function and ingesting from query. 

The following query shows me my database size: 

 

.show tables details
| extend Timestamp = now()
| extend TableSize = TotalExtentSize / 1024 / 1024
| project TableName, TableSize, Timestamp

 

I'm attempting to ingest this into a table via "Ingest from query"

I've attempted to ingest this via "ingest from query" without any luck: 

 

.append myTable <|
.show tables details
| extend Timestamp = now()
| extend TableSize = TotalExtentSize / 1024 / 1024
| project TableName, TableSize, Timestamp

 

 

Any ideas short of an external function?  Edit: This worked. 

 

Edit: Any idea how I periodically run this query? 

 

 

1 Reply

Was an issue with schema, this appears tow ork