Commit Graph
9 Commits
Author SHA1 Message Date
ddadmin 27947cee57 fix(airflow): исправлен запуск пульта на свежем стенде
- Зачем:
  - свежий стенд должен доходить до generator_control без скрытых ручных шагов и зависаний.
- Что:
  - quick start явно готовит DDL и откладывает Superset init до готового DM.
  - generator_control проверяет паузу etl_pipeline до мутирующих шагов.
  - make up пересобирает Airflow и поднимает базовый набор сервисов.
- Проверка:
  - make generator-test; docker compose config --quiet; make clean; make up; make ddl.
2026-07-05 20:47:02 +03:00
ddadmin dd4af822d2 feat(airflow): добавлен пульт управления генератором
- Зачем:
  - нужен основной ручной интерфейс стенда для backfill/import/check без консольной матрицы переменных.
- Что:
  - добавлен DAG generator_control с параметрами Airflow, ветвлением операций и ожиданием ETL.
  - вынесена общая логика запуска и предпроверок генератора для Airflow.
  - обновлены compose-настройки, зависимости, тесты и документация по пульту.
- Проверка:
  - uv run --with pytest --with-requirements generator/requirements.txt pytest generator/tests -q.
  - docker compose config --quiet.
2026-07-04 21:06:30 +03:00
ddadmin 707da9f80e feat(airflow): добавлен гейт целостности DDS для урока 4
- Зачем:
  - урок 4 должен показывать не только измерение сирот в DDS, но и остановку Airflow DAG при нарушении связи dds.event -> dds.click.
- Что:
  - добавлен assert_dds_integrity в etl_pipeline и документация управляемого красного сценария.
  - вынесены общие helper'ы для SQL-split и boolean-параметров Airflow.
  - добавлен урок 4 и обновлены навигация курса, план обучения и operations notes.
- Проверка:
  - python3 -m py_compile airflow/dags/etl_pipeline_dag.py airflow/dags/ddl_init_dag.py airflow/dags/kafka_load_dag.py airflow/dags/utils/airflow_params.py airflow/dags/utils/sql_helpers.py.
  - docker compose exec -T airflow-webserver airflow dags test etl_pipeline 2026-06-05T18:00:00 -c '{"full_refresh": true}'.
2026-06-05 19:13:22 +03:00
ddadmin 869c189fe8 refactor(airflow): move DAGs to airflow/dags and update paths
- Why:
  - keep Airflow artifacts under a single airflow/ directory
  - align repository layout with intended project structure
- What:
  - move dags/ to airflow/dags/ and update compose mounts
  - make SQL root resolution work in container and local runs
  - update DAG path references in README, AGENTS, ARCHITECTURE, and plans
  - remove tracked Python cache artifacts from old DAG location
- Check:
  - airflow dags list
  - airflow dags list-import-errors
  - e2e success: ddl_init, kafka_load(limit=50), etl_pipeline
2026-02-08 19:34:10 +03:00
ddadmin 10f5bc3510 feat(airflow): реализован DAG kafka_load для загрузки в Kafka (фаза 2)
- Добавлен kafka-python==2.0.6 в airflow/requirements.txt
- Создан dags/utils/kafka_helpers.py с функциями:
  - check_kafka_ready() — проверка доступности брокера
  - prepare_topics() — создание/сброс топиков через KafkaAdminClient
  - load_jsonl() — загрузка данных через KafkaProducer (limit=0 = все)
  - validate_load_params(), check_input_files() — валидация
- Создан dags/kafka_load_dag.py с TaskGroup:
  - precheck: check_kafka, check_input_files, validate_load_params
  - ingest: prepare_topics, параллельная загрузка 4 потоков, verify_publish_counts
- Параметры DAG: limit (0 = все), reset_topics, load_* (выбор потоков)
- Обновлена документация: AGENTS.md, README.md, plans/runbook.md,
  plans/airflow_dags_plan.md, docs/ARCHITECTURE.md

Тестирование:
- Подключение к Kafka:  (kafka:29092 доступен, брокер 2.6.0)
- Загрузка данных:  (1000 сообщений — полный файл browser_events)
- Python синтаксис:  (py_compile проходит)
- Структура DAG:  (все 9 задач корректно определены)
2026-02-08 18:13:22 +03:00
ddadmin 14d16c5cae feat(airflow): implement dag orchestration for ddl and etl
Add comprehensive DAG implementation for ClickHouse schema initialization
and ETL pipeline orchestration. The ddl_init_dag manages database schema
creation across stg/ods/dds/dm layers with verification capabilities. The
etl_pipeline_dag implements full ODS to DDS to DM transformation flow with
data quality checks, branching logic for full/incremental loads, and
timeout handling for data availability.

Additional changes:
- Upgrade Airflow from 2.9.3 to 2.10.5
- Fix ClickHouse connection to use native protocol port 9000
- Mount SQL directory in docker-compose for DAG execution
- Update project requirements and documentation comments
- Remove unused pandas dependency
2026-02-07 21:52:31 +03:00
ddadmin 226807ecae chore(airflow): replace clickhouse-connect with airflow-clickhouse-plugin 2026-02-07 20:55:14 +03:00
ddadmin fe9c15c0fe feat(airflow): configure ClickHouse connection and update infrastructure
Update Airflow configuration to integrate with ClickHouse DWH instead of
PostgreSQL training database. Changes include:

- Switch Airflow dependencies from PostgreSQL to ClickHouse connector
- Update docker-compose to use ClickHouse connection and correct Dockerfile
- Refactor airflow/requirements.txt to include only essential packages
- Add DAGs directory for ETL pipeline orchestration
- Update documentation to reflect Airflow integration and access credentials
- Adjust service dependencies to wait for ClickHouse startup
2026-02-06 23:34:45 +03:00
ddadmin d33cdb3fb0 feat(infra): add airflow orchestration services
Add Apache Airflow infrastructure with webserver, scheduler, and metadata
database to enable DAG-based pipeline orchestration. Includes optimized
requirements file and Docker configuration for Airflow 2.9.3.
2026-02-06 23:20:58 +03:00