Skip to content

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

License

Notifications You must be signed in to change notification settings

ContainerSolutions/gcp-billing-csv

Repository files navigation

  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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages