ambika-garg / PowerBI_Airflow_Plugin

Apache Airflow Plugin for a Power BI dataset refresh.
Apache License 2.0
7 stars 3 forks source link

Adjust operator to support Workspace Name and Dataset Name instead of Ids #3

Open pikachuev opened 4 months ago

pikachuev commented 4 months ago

Is it possible to adjust the operator and add support for a scenario when input parameters will be names, not Ids?

pikachuev commented 3 months ago

Hi @ambika-garg Is it possible to add 2 methods - list_wokspaces() and list_datasets(workspace/group_id as a parameter) in the hook? In a similar way on how it is done in dbt cloud hooks: https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/stable/_api/airflow/providers/dbt/cloud/hooks/dbt/index.html#airflow.providers.dbt.cloud.hooks.dbt.DbtCloudHook.list_accounts and https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/stable/_api/airflow/providers/dbt/cloud/hooks/dbt/index.html#airflow.providers.dbt.cloud.hooks.dbt.DbtCloudHook.list_projects

ambika-garg commented 3 months ago

Yes, I can add these two functions. Can you explain the use case of these functions?

pikachuev commented 3 months ago

Hi @ambika-garg , the use case is to use Workspace name and Dataset name as parameters of a Dag (not ids). With these two functions it will simplify search of dataset/group id by name to provide them into Operator as input.