bigfunctions icon indicating copy to clipboard operation
bigfunctions copied to clipboard

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

Open AntoineGiraud opened this issue 1 year ago • 1 comments

Check the idea has not already been suggested

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

  • [X] 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

AntoineGiraud avatar Aug 01 '24 08:08 AntoineGiraud

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 !

AntoineGiraud avatar Aug 01 '24 08:08 AntoineGiraud

Merged!

Great job @AntoineGiraud ! 💯

unytics avatar Sep 19 '24 15:09 unytics