Hi Annu,
The problem with your answer is there won't be a fixed number of pointNames as it is a Java List of Strings. Therefore the number of requested points could be 1, it could be 8, it could be 100 etc.
I've spent a few hours working on this and came up with this solution which works
var pointList = pointNames.stream().collect(Collectors.joining("','", "dynamic(['", "'])"));
var clientRequestProperties = new ClientRequestProperties();
clientRequestProperties.setParameter("pointList", pointList);
var query = """
declare query_parameters(pointList:dynamic);
let pointNames = pointList;
CurrentData
| where Point in (pointNames)
""";
return kustoClient.execute("MyDB", query, clientRequestProperties);
The Collectors.joining(delimiter, prefix, suffix) creates a kusto dynamic array in the format: -
dynamic(['point name1', 'point name2', 'point name3'..... , 'point nameX'])
which can be passed into query as a dynamic type
Regards
Mark