diff --git a/cosmos/operators/local.py b/cosmos/operators/local.py index c5d47dd48..d49b4af86 100644 --- a/cosmos/operators/local.py +++ b/cosmos/operators/local.py @@ -504,8 +504,14 @@ def run_command( self.store_compiled_sql(tmp_project_dir, context) self.upload_compiled_sql(tmp_project_dir, context) if self.callback: + dirlist = os.listdir(f"{tmp_project_dir}/target") + print("Before: Files and directories in '", tmp_project_dir, "' :") + print("\t", dirlist) self.callback_args.update({"context": context}) self.callback(tmp_project_dir, **self.callback_args) + dirlist = os.listdir(f"{tmp_project_dir}/target") + print("After: Files and directories in '", tmp_project_dir, "' :") + print("\t", dirlist) self.handle_exception(result) return result @@ -899,6 +905,9 @@ def upload_to_cloud_storage(self, project_dir: str, **kwargs: Any) -> None: 'Attempting to upload generated docs to S3 using S3Hook("%s")', self.connection_id, ) + dirlist = os.listdir(f"{project_dir}/target") + print("Files and directories in '", project_dir, "' :") + print("\t", dirlist) from airflow.providers.amazon.aws.hooks.s3 import S3Hook @@ -965,6 +974,9 @@ def upload_to_cloud_storage(self, project_dir: str, **kwargs: Any) -> None: 'Attempting to upload generated docs to Azure Blob Storage using WasbHook(conn_id="%s")', self.connection_id, ) + dirlist = os.listdir(f"{project_dir}/target") + print("Files and directories in '", project_dir, "' :") + print("\t", dirlist) from airflow.providers.microsoft.azure.hooks.wasb import WasbHook @@ -1009,6 +1021,9 @@ def upload_to_cloud_storage(self, project_dir: str, **kwargs: Any) -> None: 'Attempting to upload generated docs to Storage using GCSHook(conn_id="%s")', self.connection_id, ) + dirlist = os.listdir(f"{project_dir}/target") + print("Files and directories in '", project_dir, "' :") + print("\t", dirlist) from airflow.providers.google.cloud.hooks.gcs import GCSHook