ContainerSolutions / gcp-billing-csv

DB to store billing csv data from GCP in Postgres so it can be queried using SQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. Create a postgres database called 'cost' and give yourself access, eg
$ su - postgres
postgres@bacon:~$ psql
postgres=# create database cost;
CREATE DATABASE
postgres=# GRANT ALL PRIVILEGES ON DATABASE cost to <USERNAME>;
GRANT
  1. Download report from Billing

    a) => Cost Table => Table configuration (Select No Grouping)

    b) Download and copy/move to raw_billing_csvs/ folder

  2. ./run.sh

  3. psql cost < queries.sql

The queries can be adjusted for your particular needs in analysis.

About

DB to store billing csv data from GCP in Postgres so it can be queried using SQL

License:MIT License


Languages

Language:Shell 100.0%