microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.
Apache License 2.0
510 stars 97 forks source link

externaldata operator only accepts static ConnectionStrings #58

Closed hjorrip closed 1 year ago

hjorrip commented 2 years ago

I would like to be able to pass in a string variable as the ConnectionString to the externaldata operator.

externaldata ( ColumnName : ColumnType [, ...] ) [ StorageConnectionString [, ...] ] <--- To this value right here [with ( PropertyName = PropertyValue [, ...] )]

The documentation only shows that it must be a static, hardcoded value enclosed in quotes, like this example from the documentation: Users | where UserID in ((externaldata (UserID:string) [ @"https://storageaccount.blob.core.windows.net/storagecontainer/users.txt" h@"?...SAS..." // Secret token needed to access the blob ])) | ...

This query would throw an exception. Is there any "tricks" to execute queries such as this one? let my_url_variable = "www.example.com" Users | where UserID in ((externaldata (UserID:string) [ my_url_variable ])) | ...

mattwar commented 1 year ago

Suggestions for feature changes outside of this library should be brought up using User Voice or the feedback button on Azure Data Explorer.