Code Monkey home page Code Monkey logo

crystal-costs's Introduction

Crystal Costs

Crystal Costs is an AI agent designed for Snowflake administrators, simplifying cost monitoring through a conversational interface. It visualizes trends, forecasts costs, and makes complex data about credit consumption accessible and actionable.

Features

  • Visualization of Warehouse Credits and Costs History: Track and analyze historical credit usage and spending patterns.
  • Forecasting Future Credit Consumption and Costs: Predict future credit usage and costs for proactive cost management.
  • Conversational Bot with Chat History Memory: Interact with a bot that remembers chat history and provides contextually relevant responses.

Prerequisites

To enable forecasting features, the following steps must be completed:

  1. Create a database called PREDICTION_ARCTIC_DB.
  2. Create a schema called WAREHOUSE_METERING_PREDICTIONS.
  3. Create a view called credit_usage_model using the example provided below.

Example View

CREATE OR REPLACE VIEW PREDICTION_ARCTIC_DB.WAREHOUSE_METERING_PREDICTIONS.credit_usage_model AS (
    SELECT to_timestamp_ntz(DATE(start_time)) AS "START_TIME", warehouse_name, SUM(credits_used) AS "CREDITS_USED"
    FROM snowflake.account_usage.warehouse_metering_history
    WHERE warehouse_name IN (SELECT warehouse_name FROM snowflake.account_usage.warehouse_metering_history WHERE DATE(start_time) >= CURRENT_DATE - 180 GROUP BY 1 HAVING COUNT(DISTINCT(DATE(start_time))) >= 30)
    GROUP BY 1, 2
);

Note: Forecasting features will not work correctly if these steps are not followed. Other features will function normally without these steps.

Usage

Crystal Costs leverages the power of AI to provide Snowflake admins with insights into their credit consumption, making it easier to monitor and forecast costs. By following the prerequisites, admins can ensure accurate forecasting and take full advantage of the tool's capabilities.

Acknowledgements

We would like to thank the Snowflake community and the Streamlit community for their support and contributions.

crystal-costs's People

Contributors

priyanshu-09 avatar ayerajath avatar sp35 avatar

Stargazers

 avatar Anirudh Hegde avatar Ranjith avatar  avatar Pons Ramalingam avatar Shubhankar Srivastava avatar

Watchers

Shubhankar Srivastava avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.