Python SDK - Jobs
import askanna askanna.job.list()
|project_suuid||String||No||Project SUUID of the project for which you want to get a list of jobs|
If you don’t specify the project_suuid, you will get a list with all jobs you have access too.
List with elements with Dataclass: Job
import askanna job = askanna.job.get_job_by_name(job_name="Name of the Job")
|job_name||String||Yes||Name of the job you want to get the job info from|
|project_suuid||String||No||Project SUUID of the project for which you want to get the job info from. Can be necessary in combination with job_name.|
Multiple jobs with the same name
In case multiple jobs with the same name exist, you will see an error message. In that case you can add the project_suuid for which you want to get the job information.
import askanna askanna.job.change(suuid="Job SUUID", name=..., description=...)
|suuid||String||Yes||SUUID of the job you want to change|
|name||String||No||New name for the job|
|description||String||No||New description for the job|
At least a new name, or a new description should be provided.
Changed the job name? Then update the
askanna.yml as well.
Changing the name of a job can be useful in case you want to rename your job. If you are going to rename the job, don't forget to rename the job in the askanna.yml.
If you don't do this, you will not be able to run the job anymore because there is no matching job definition in the askanna.yml config. And if you don't change it in the askanna.yml file, the next time you push a new version of your code to AskAnna we will create a new job using the old name.