Hello all,
I am using Grafana 8.3.4 on AKS with Helm charts deployment. I want to deploy a new Dashboard, containing GeoMap coordinates of MS SQL datasource. First step is done - I managed to present a new MS SQL datasource and configured Latitude and Longitude. Now I am trying to extend a little bit and to create a second Dashboard, containing some datasource logic - I have another database which I added as a second datasource, containing Client Id`s which are currently active. This client Ids could be retrieved in the first database as well.
I want to achieve Mixed datasourcing with transformation to show only active Clients on the dashboard. I already tried with Merge and Outer join but I couldn`t gain any success. To be more clear, here are the SQL queries:
SELECT ClientId as ClientId FROM [User].[Clients] where Timestamp >= CAST(GETDATE() AS DATE) AND FinishedAt IS NULL
This is running against the first database and returns me a list of active clients at the moment - ClientIds
And this one is running against the second database:
select cast(Latitude as decimal(10, 6)) as Latitude, cast(Longitude as decimal(10, 6)) as Longitude, ClientId as ClientId from [DB].[Coordinates]
The above query returns me a list with Latitude, Longitude and ClientId. The ClientId which is the same client Id as the first SQL query if it`s in the list.
I want to use Transformation to receive the data in the following format:
Latitude, Longitude and (optional) ClientId ONLY from the first query. All of the another ClientIds and Lat/Longs should be stripped.
The question is, how to perform a transformation to receive a list with Latitude and Longitude (optional ClientId) with only the clientId from the first query (the active client) ?
Sorry if became too complicated, hope it is still clear to understand and thanks in advance!
Regards,
Stefan Lazarov