Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup/Sanitize #3758

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/workflows/airqo_etl_utils/data_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,6 @@ def transform_devices(devices: List[Dict[str, Any]], task_instance) -> pd.DataFr
pd.DataFrame: Transformed DataFrame if the devices data has changed since
the last execution; otherwise, an empty DataFrame.
"""
from .airqo_utils import (
AirQoDataUtils,
)
import hashlib

devices.rename(
Expand Down
6 changes: 4 additions & 2 deletions src/workflows/dags/airqo_kafka_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ def airqo_devices_data():

@task()
def extract_devices(**kwargs) -> pd.DataFrame:
return AirQoApi.get_devices()
airqo_api = AirQoApi()
return airqo_api.get_devices()

@task()
def send_device_data_to_broker(devices: pd.DataFrame, **kwargs) -> None:
from airqo_etl_utils.message_broker_utils import MessageBrokerUtils
from airqo_etl_utils.data_validator import DataValidationUtils

devices = DataValidationUtils.transform_devices(
data_validation = DataValidationUtils()
devices = data_validation.transform_devices(
devices=devices, taskinstance=kwargs["ti"]
)
if not devices.empty:
Expand Down
Loading