Dagster Cloud pricing is based on usage. If you are using Airflow, you can get an estimate of this usage by querying the Airflow metadata database.
For SQLite:
# navigate to your airflow DB, normally ~/airflow
sqlite3
.open airflowdb
SELECT SUM((julianday(end_date) - julianday(start_date))* 24 * 60) AS run_minutes FROM dag_run;
The Airflow dag_run
table has the following fields which you can use to group or filter this query:
dag_id
run_id
state
run_type
For Postgres the SQL is similar. This query breaks down the run usage by month:
SELECT
date_trunc('month', start_date) AS month,
SUM(EXTRACT(epoch FROM (end_date - start_date))/60) AS run_minutes
FROM dag_run
GROUP BY 1;