unytics/bigfunctions

[new]: `refresh_powerbi(dataset_id, workspace_id, tenant_id, client_id, client_secret_encrypted)`

Closed this issue · 2 comments

Check the idea has not already been suggested

Edit the title above with self-explanatory function name and argument names

  • The function name and the argument names I entered in the title above seems self explanatory to me.

BigFunction Description as it would appear in the documentation

Refresh a power bi semantic model (dataset) named semantic_model_title.

Once your model is refreshed by your favorite orchetrator,
you can setup a post hook/operation that will call, from BigQuery in SQL,
this refresh_powerbi function in order to lauch dataset refresh

Examples of (arguments, expected output) as they would appear in the documentation

select bigfunctions.eu.refresh_powerbi(
    'dataset_id', 'workspace_id', 'tenant_id',
     'client_id', 'ENCRYPTED_SECRET(GvVm...)')
  1. login :
    • from azure.identity import ClientSecretCredential
    • ClientSecretCredential(tenant_id, client_id, client_secret, authority=authority)
  2. refresh : POST: https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/datasets/{dataset_id}/refreshes

PS: api refresh script functionnal on my side,
just have to take te time to implement it the BigFunctions way ;)

will craft it at the en of the month !

Merged!

Great job @AntoineGiraud !
💯