MCPcopy Create free account

hub / github.com/abeltavares/batch-data-pipeline / functions

Functions59 in github.com/abeltavares/batch-data-pipeline

↓ 23 callersFunctionget_config
Get configuration value.
src/config.py:74
↓ 13 callersMethodget
Get configuration value by nested keys.
src/config.py:60
↓ 7 callersMethod_get_bucket
Get bucket name for a specific layer.
src/processors/base_processor.py:77
↓ 6 callersFunctionget_logger
Get configured logger.
src/utils/logger.py:6
↓ 5 callersMethod_handle_error
Standardized error handling across all processors. Args: error: The exception that occurred context:
src/processors/base_processor.py:62
↓ 4 callersFunctionpush_metrics
Push metrics to Pushgateway with optional grouping key. Args: grouping_key: Dictionary of labels to use as grouping key.
src/utils/metrics.py:49
↓ 3 callersMethod_upsert_to_delta
Upsert DataFrame to Delta table using MERGE operation. Idempotent - safe to re-run. Args: table_name: Na
src/processors/gold_processor.py:316
↓ 3 callersMethodget_storage_options
Get storage options for Delta Lake.
src/utils/storage.py:60
↓ 3 callersMethodupload_json
Upload JSON data to S3.
src/utils/storage.py:26
↓ 2 callersMethod_track_metrics
Shared metric tracking logic.
src/processors/base_processor.py:45
↓ 1 callersMethod_aggregate_customer_segments
Calculate and write customer segmentation.
src/processors/gold_processor.py:259
↓ 1 callersMethod_aggregate_daily_sales
( self, sales_arrow: pa.Table, date: str )
src/processors/gold_processor.py:163
↓ 1 callersMethod_aggregate_product_performance
Calculate and write product performance.
src/processors/gold_processor.py:208
↓ 1 callersMethod_create_connection
Create configured DuckDB connection.
src/utils/database.py:25
↓ 1 callersMethod_deduplicate
Deduplicate records against existing Delta table using partition pruning. Returns: (arrow_new, duplicates_removed)
src/processors/silver_processor.py:145
↓ 1 callersMethod_execute_parallel_aggregations
Execute multiple aggregations in parallel using ThreadPoolExecutor. Args: aggregations: List of (name, function)
src/processors/gold_processor.py:119
↓ 1 callersMethod_load_config
Load and validate configuration.
src/config.py:21
↓ 1 callersMethod_load_silver_data
Load only today's partition for incremental aggregation.
src/processors/gold_processor.py:90
↓ 1 callersMethod_replace_env_vars
Recursively replace ${VAR} with environment variables.
src/config.py:48
↓ 1 callersMethod_run_soda_checks
Execute Soda Core checks on the DataFrame. Returns a result dict for process().
src/processors/quality_checker.py:97
↓ 1 callersMethod_validate_config
Validate processor-specific configuration. Must be implemented by subclasses.
src/processors/base_processor.py:28
↓ 1 callersMethod_write_to_delta
Write Arrow Table to Delta Lake using APPEND mode. Idempotent - safe to re-run.
src/processors/silver_processor.py:202
↓ 1 callersFunctionaggregate_to_gold
Create Gold layer business metrics. Uses ThreadPoolExecutor for parallel table processing. Returns: {
airflow/dags/sales_pipeline.py:261
↓ 1 callersMethodgenerate_customers
Generate customer dimension.
src/generators/sales_generator.py:123
↓ 1 callersMethodgenerate_products
Generate product catalog.
src/generators/sales_generator.py:108
↓ 1 callersMethodgenerate_sales
Generate incremental sales transactions with realistic data quality issues.
src/generators/sales_generator.py:26
↓ 1 callersFunctioningest_sales_data
Ingest incremental sales to Bronze layer. Returns: {"key": s3_key, "count": record_count, "status": "success"}
airflow/dags/sales_pipeline.py:89
↓ 1 callersFunctionload_dimension_tables
Load product and customer dimensions (idempotent). Returns: {"status": "loaded" | "skipped", "products": int, "c
airflow/dags/sales_pipeline.py:118
↓ 1 callersMethodload_dimensions
Load dimension tables (products and customers). Idempotent - skips if already loaded. Returns: {"status"
src/processors/bronze_processor.py:73
↓ 1 callersMethodobject_exists
Check if object exists in S3.
src/utils/storage.py:52
↓ 1 callersMethodprocess
Run Soda Core quality checks on Silver data. Returns: { "status": "success" | "failed" | "skippe
src/processors/quality_checker.py:39
↓ 1 callersMethodprocess
Process Bronze data to Silver Delta table. Args: bronze_key: S3 key of the Bronze data file Ret
src/processors/silver_processor.py:32
↓ 1 callersMethodprocess
Create daily business metrics as Delta tables. Processes all aggregations in parallel using ThreadPoolExecutor. Retu
src/processors/gold_processor.py:33
↓ 1 callersMethodprocess
Ingest sales data to Bronze layer. Returns: { "key": "s3_key_path", "count": rec
src/processors/bronze_processor.py:21
↓ 1 callersFunctionprocess_to_silver
Process Bronze → Silver with cleaning and deduplication. Args: bronze_result: Output from ingest_sales_data task
airflow/dags/sales_pipeline.py:148
↓ 1 callersFunctionsales_delta_pipeline
Sales data pipeline with Bronze-Silver-Gold architecture. Uses Interface Inheritance pattern for clean, maintainable code.
airflow/dags/sales_pipeline.py:78
↓ 1 callersFunctionskip_aggregation
Placeholder task for when aggregation is skipped. Uses AirflowSkipException for proper task state.
airflow/dags/sales_pipeline.py:304
↓ 1 callersFunctiontrack_quality_failure
Track data quality failures.
src/utils/metrics.py:82
↓ 1 callersFunctiontrack_records
Track number of records processed.
src/utils/metrics.py:73
↓ 1 callersFunctiontrack_table_size
Track Delta table size.
src/utils/metrics.py:91
↓ 1 callersFunctionvalidate_data_quality
Run Soda Core quality checks on Silver data. Returns: { "status": "success" | "failed" | "skippe
airflow/dags/sales_pipeline.py:188
Method__enter__
Context manager entry.
src/utils/database.py:15
Method__exit__
Context manager exit.
src/utils/database.py:20
Method__init__
(self)
src/utils/database.py:12
Method__init__
(self)
src/utils/storage.py:14
Method__init__
(self)
src/generators/sales_generator.py:16
Method__init__
(self)
src/processors/base_processor.py:21
Method__new__
(cls)
src/config.py:14
Method_validate_config
Validate quality checker configuration.
src/processors/quality_checker.py:17
Method_validate_config
Validate Silver-specific configuration.
src/processors/silver_processor.py:20
Method_validate_config
Validate Gold-specific configuration.
src/processors/gold_processor.py:21
Method_validate_config
Validate Bronze-specific configuration.
src/processors/bronze_processor.py:15
Methodprocess
Main processing logic - must be implemented by subclasses. Returns: Dict with processing results (status, counts
src/processors/base_processor.py:36
Functionshould_aggregate
Determine if daily aggregation should run. Runs on first execution OR at configured hour (default: midnight UTC). Re
airflow/dags/sales_pipeline.py:219
Methodupload_parquet
Upload Parquet data to S3.
src/utils/storage.py:39
Methodvalidate_payment_method
Validate payment method.
src/models/schemas.py:29
Methodvalidate_segment
Validate customer segment.
src/models/schemas.py:66
Methodvalidate_status
Validate transaction status.
src/models/schemas.py:37
Methodvalidate_total
Ensure total_amount matches quantity * unit_price.
src/models/schemas.py:21