This Chrome extension calculates the cost of running a query in Looker based on the volume of data processed. It enhances the Looker UI by appending the calculated cost to the query performance metrics displayed in the Looker Explore interface.
This is a simple, initial version of the extension and is not production-ready. The code is not maintained and is provided "as-is." Users may use and modify the code at their own risk. This project is merely an example to demonstrate how one might approach calculating query costs in Looker.
- Automatically calculates query cost
- Works with Looker Explore
- Supports different units: KB, MB, GB, and TB
- Customizable cost per TB
- Lightweight and easy to use
By default, the extension uses a rate of $6.25 per terabyte for calculating the cost (price per terabyte on BigQuery). To change this rate, follow these steps:
- Open the file
content.js
in a text editor. - Locate the variable
pricePerTB
near the top of the file. - Change the value to your desired rate. For example, to set the rate to $3 per terabyte, you would change the line to
const pricePerTB = 3;
. - Save the changes and reload the extension in Chrome.
-
Clone the GitHub repository:
git clone https://github.com/your-username/LookerQueryCost-ChromeExtension.git
-
Open Google Chrome and go to
chrome://extensions/
. -
Enable "Developer Mode" if it's not already enabled.
-
Click on "Load Unpacked", select the directory where you cloned the repository, and select the folder called "LookerQueryCost".
-
Open Looker and navigate to the Explore interface.
-
Prepare your query by adding dimensions and measures.
-
The cost of the query will be automatically calculated and displayed next to the query volume metrics.
This project is licensed under the MIT License - see the LICENSE file for details.