Forum Discussion

tahechadv_2022's avatar
3 years ago
Solved

Convert M Language to Python

Hi guys!

 

The code below is from Bitrix24 it connects automatically to our database and download the tables directly in PBI, but PBI service can not automatically update the dashboard.

 

I would like to convert it to Python (or any other programming language) in order to upload the tables in our DW. Then it would be easier to connect PBI desktop to our DW and automatically update the dashboards

 

response = Web.Contents(
"https://" & #"Server address",
[
RelativePath = "bitrix/tools/biconnector/pbi.php",
Query = [
//token = #"Secret key",
table = bx24_entity_name
],
Content = Json.FromValue([dateRange = [
startDate = Date.AddYears(Date.From(DateTime.LocalNow()),-1),
endDate = Date.From(DateTime.LocalNow())],
key = #"Secret key"
]
)
]
),
jd = Json.Document(response)

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI tahechadv_2022,

    AFAIK, current it only supports R and python scripts as the data source and they will also require a personal data gateway to handle and execute these scripts.

    For the sample M query, I'd like to suggest you add the get token steps before the current steps, then these codes can be refreshed without manually updating tokens.

    Regards,

    Xiaoxin Sheng