{#- Context variables:
   - company: str (e.g., "ACME Bank")
   - industry: str (e.g., "fsi")
   - catalog: str (e.g., "acme_fsi_demo")
   - bundle_name: str (e.g., "acme-bank-fsi-demo")
   - app_name: str (e.g., "acme-bank-fsi-app")
   - warehouse_id: str
   - workspace_host: str
   - databricks_profile: str | None
   - lakebase_url: str | None
   - notification_email: str
-#}
resources:
  pipelines:
    {{ bundle_name | replace('-', '_') }}_dlt_pipeline:
      name: {{ bundle_name }}_dlt_pipeline

      # Target catalog and schema — required for Unity Catalog pipelines
      catalog: ${var.catalog}
      target: ${var.pipeline_target_schema}

      # Pipeline configuration
      channel: CURRENT
      photon: true
      serverless: true
      continuous: false
      development: true
      edition: ADVANCED

      # Notebook libraries that define the pipeline
      libraries:
        - glob:
            include: ${workspace.file_path}/src/pipelines/bronze/**
        - glob:
            include: ${workspace.file_path}/src/pipelines/silver/**
        - glob:
            include: ${workspace.file_path}/src/pipelines/gold/**

      root_path: ${workspace.file_path}/src/pipelines

      # Configuration settings
      configuration:
        pipelines.enableTrackHistory: "true"
        pipelines.trigger.interval: "1 hour"

      # Notifications
      notifications:
        - email_recipients:
            - ${var.notification_email}
          alerts:
            - "on-update-failure"
            - "on-update-fatal-failure"
            - "on-flow-failure"
