zamar-roura opened a new issue, #20832:
URL: https://github.com/apache/superset/issues/20832

   ## [SIP-88] BigQuery Estimate Cost Button SQL Lab
   
   ### Motivation
   
   There is currently no estimate cost button for Bigquery schemas. Before 
running a query it would be good to know how many bytes will be processed. In 
EUW 1TB = 5€ aprox.
   
   ### Proposed Change
   We need to add the three cost estimate methods to bigquery.py
   
   - 1)
   
![image](https://user-images.githubusercontent.com/12966153/180495891-c36604b3-b403-4334-bc06-af0a9532ab9b.png)
   - 2)
   
![image](https://user-images.githubusercontent.com/12966153/180495924-7f47d290-e69f-489c-a6a4-2d16be98c413.png)
   - 3)
   We need to execute a dryrun calling pybigquery api.
   
![image](https://user-images.githubusercontent.com/12966153/180495962-14d6f86d-31f0-4d0c-87b7-d508a27791db.png)
   
   ### New or Changed Public Interfaces
   
   Change:
   
   `estimate_statement_cost(cls, statement: str, cursor: Any)`
   
   to 
   
   `estimate_statement_cost(cls, statement: str, cursor: Any, database: 
Database)
   `
   
   This is needed because we need the credentials for the API. In postgres.py 
and presto.py this is done via query. In Bigquery it's not possible.
   
   ### New dependencies
   
   Not needed.
   
   ### Migration Plan and Compatibility
   
   Not needed.
   
   ### Rejected Alternatives
   
   None yet.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to