Prefect Upload

This Prefect flow automates the process of running your dbt project, collecting artifacts, and uploading them to Euno.

Prerequisites

  • Python 3.8+

  • Prefect 2.0+

  • prefect-dbt package

  • requests library

Installation

pip install prefect prefect-dbt requests

Configuration

Before running the flow, update these configuration variables:

WEBHOOK_URL = "https://api.app.euno.ai/accounts/YOUR_ACCOUNT_ID/integrations/YOUR_INTEGRATION_ID/run"
EUNO_TOKEN = "your_integration_key_here"
DBT_PROJECT_PATH = "/path/to/your/dbt/project"
DBT_PROFILES_PATH = "/path/to/your/dbt/profiles"  # e.g., "/Users/username/.dbt"

Prefect Flow

Enhanced Flow with Error Handling

For production use, consider this enhanced version with better error handling and logging:

Usage

Option 1: Direct Execution

Option 2: Prefect Deployment

Option 3: Scheduled Runs

Configuration with Prefect Blocks

For production use, store sensitive information using Prefect Blocks:

Monitoring and Alerts

Add notification blocks for monitoring:

Notes

  • The flow automatically handles temporary file cleanup

  • Retry logic is built into dbt commands and webhook uploads

  • Missing optional artifact files (like semantic_manifest.json) won't fail the flow

  • The enhanced version includes comprehensive logging and error handling

  • Consider using Prefect Blocks for storing sensitive configuration in production

Last updated