diff --git a/datalab/datalab_session/tasks.py b/datalab/datalab_session/tasks.py new file mode 100644 index 0000000..00878f4 --- /dev/null +++ b/datalab/datalab_session/tasks.py @@ -0,0 +1,13 @@ +import dramatiq +from datalab.datalab_session.data_operations.data_operation import available_operations + +#TODO: Perhaps define a pipeline that can take the output of one data operation and upload to a s3 bucket, indicate success, etc... + +@dramatiq.actor() +def execute_data_operation(data_operation_name: str, input_data: dict): + clz = available_operations().get(data_operation_name) + if clz is None: + raise NotImplementedError("Operation not implemented!") + else: + instance = clz() + instance.operate(input_data)