Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on February 13, 2025 8:23PM
Likes: 0
Replies: 1
Hi, I am quite new in Dataiku and I am interested why the following code does not work as expected. Namely, I am trying to define custom trigger that will check if the folder is empty.
Both
from dataiku.scenario import Trigger t=Trigger() folder = dataiku.Folder("folder_id") files = folder.list_paths_in_partition() if files: t.fire()
and
from dataiku.scenario import Trigger t=Trigger() client = dataiku.api_client() project = client.get_default_project() folder = project.get_managed_folder("project_id") files = f.list_contents()["items"] if files: t.fire()
do not fire the trigger. I cannot open the logs since I do not have appropriate permissions I guess.
Do you have any suggestions how to solve this?
Thank you!
Oh, forgot to import dataiku package :) Sorry