Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Hi All, Is There Anyway To Get The Id Of The Pipeline Using Pipeline Name? I Need The Id Of The Pipeline So That I Can Schedule The Pipeline To Run Via


Hi @<1523701205467926528:profile|AgitatedDove14> , It works if I dont specify the project name and just give the task name. So I modified the above code a bit and now I'm able to get the id of the latest pipeline run.

task_to_schedule: Task = Task.get_task(task_id='b0732c334115432f8dc0cec0dbfdbdcb')
print(task_to_schedule.get_project_name())
# Output: Project Team NASA/.pipelines/NASA Pipeline
print(task_to_schedule.name)
# Output: NASA Pipeline #11


# task: Task = Task.get_task(project_name=task_to_schedule.get_project_name(),
#                            task_name=task_to_schedule.name)
# Error: ValueError: No projects found when searching for `Project Team NASA/.pipelines/NASA Pipeline`

tasks = Task.get_tasks(task_name= task_to_schedule.name,
                       task_filter={
                           "status": ["completed"],
                           "order_by": ["-last_update"]
                       })
# Returns multiple tasks by the same name 
# (The pipeline was run by scheduler multiple times, so same name)

required_task: Task = tasks[0]
# Here I'm picking the latest completed pipeline

print(required_task.id)
# Output: 80836a14e8b0482cab14fa58484b99d0 (id of latest pipeline run)
  
  
Posted one year ago
126 Views
0 Answers
one year ago
one year ago