powerbipowerbi-desktopdruid

How to connect Apache Druid to Power BI without third party software's?


Can anybody please share with me the procedure to connect apache druid to power bi, many of the web tutorials I have tried but my unluck none of the implementations are work.


Solution

  • let
      Query1 = Json.Document(Web.Contents("paste_url:paste_port/druid/v2/?pretty", 
    [Headers=[#"Content-Type"="application/json"], 
    Content=Text.ToBinary(
    "{
    ""queryType"": ""groupBy"",
    ""dataSource"": ""paste_your_table"",
    ""dimensions"": [""dimension1""] ,
    ""granularity"": ""all"",
    ""aggregations"": 
           [
           {
           ""name"": ""metric1"",
           ""type"": ""longSum"",
           ""fieldName"": ""metric1""
           }
           ],       
    ""intervals"": [ ""2020-07-27T00:00:00.000/2020-08-03T00:00:00.000"" ]
    }
    
      
      "
    )
    ]
    )),
        totable = Table.FromList(Query1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
        expand = Table.ExpandRecordColumn(totable, "Column1", {"version", "timestamp", "event"}, {"Column1.version", "Column1.timestamp", "Column1.event"})
    in
        expand