0
votes

I am using REST API (https://docs.microsoft.com/en-us/azure/kusto/api/rest/request) to interact with the database in ADX. I want to create more databases in the same cluster. How should I do it using Java?

I am not using the Java SDK. I have relied on the REST APIs so far. I think I cannot create a new database using the REST API, so looking for alternative.

It would have been really helpful if there was a command like ".create table tablename" just for the database.

2

2 Answers

3
votes

Clusters and databases can be managed using the "Control Plane", aka ARM APIs. These APIs have libraries in different languanges (as well as REST). For instance, for the java library use this link, for C# use this link

Example for how to create a database in C# library (Java should be very similar):

var database = managementClient.Databases.CreateOrUpdate(resourceGroup, clusterName, databaseName, new Database(location, softDeletePeriod: softDeletePeriod, hotCachePeriod: hotCachePeriod));

Read more here

0
votes

I think you'll need to use the Azure ARM REST API since the database is treated as a resource. From that point you can interact with it through the ADX APIs.