Masthead Data
  • Introduction
    • What is Masthead Data?
    • Data Anomaly Detection
    • Pipeline and Model Observability
    • Data Quality Scans
    • Metadata management: Column-level lineage and Data Dictionary
  • GET STARTED
    • Quickstart
  • Data Products
    • Data Products
    • Domains
  • COST INSIGHTS
    • Pipeline Costs
      • Compute model adjustment by technology
    • Storage Costs
  • INTEGRATIONS
    • Slack
    • Looker
    • PagerDuty
    • Power BI
  • Resources
    • Release Notes
    • Compliance & Trust Center
    • Support
Powered by GitBook
On this page
  • Airflow
  • DBT
  • Looker
  1. COST INSIGHTS
  2. Pipeline Costs

Compute model adjustment by technology

Last updated 1 day ago

Different technologies often follow clear patterns of computational resources better suited for their workload. Masthead provides recommendations when a specific technology offers significant savings and can be optimized with minimal effort. For the most common technologies, we’ve compiled a list of actions to help you update the compute model across all jobs at the technology level.

Airflow

reservation_id = 'RESERVATION_ID'
sql_with_overridden_reservation = f"""SET @@reservation='{reservation_id}';
{your_sql}
"""
BigQueryInsertJobOperator(
    task_id="run_query",
    configuration={
        "query": {
            "query": sql_with_overridden_reservation
        }
    },
    ...
)

DBT

Use to add the SQL statement updating the reservation to be used.

{{ config(
    pre_hook="SET @@reservation='RESERVATION_ID';",
    ...
) }}

SELECT ...

Looker

Editing in the Looker connection can run the jobs in a dedicated project which is either assigned to a reservation or uses on-demand capacity.

The service account will require and roles in this project.

DBT pre-hooks
Billing Project ID
BigQuery Job User
Service Usage Consumer