Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi Everyone,
I know we can get the selected engine details of a recipe using the API.
but is there a way to change the engine of the recipe as well using the API ?
Any suggestions are welcome ๐
Thanks..
Hi @NN ,
It is possible to change the engine used by a recipe by changing the value of `engineType` in that recipe's settings.
Here's an example (assume the `engineType` is 'DSS' and I want to change it to 'SQL' via the API):
import dataikuapi
host = DSS_HOST
apiKey = DSS_API_KEY
client = dataikuapi.DSSClient(host, apiKey)
proj = client.get_project("COMMUNITY_24974")
recipe = proj.get_recipe("compute_orders_copy_filtered")
settings = recipe.get_settings()
settings.raw_params['engineType']='SQL'
settings.save()
Note: a recipe may be able to use only a subset of engines. To determine which engines are eligible to be used by a recipe check the output of `recipe.get_status().get_engines_details()`. If an engine has `'isSelectable': True` then that engine can be used for that recipe.
Thank you,
Mike
Hi @NN ,
It is possible to change the engine used by a recipe by changing the value of `engineType` in that recipe's settings.
Here's an example (assume the `engineType` is 'DSS' and I want to change it to 'SQL' via the API):
import dataikuapi
host = DSS_HOST
apiKey = DSS_API_KEY
client = dataikuapi.DSSClient(host, apiKey)
proj = client.get_project("COMMUNITY_24974")
recipe = proj.get_recipe("compute_orders_copy_filtered")
settings = recipe.get_settings()
settings.raw_params['engineType']='SQL'
settings.save()
Note: a recipe may be able to use only a subset of engines. To determine which engines are eligible to be used by a recipe check the output of `recipe.get_status().get_engines_details()`. If an engine has `'isSelectable': True` then that engine can be used for that recipe.
Thank you,
Mike
Thanks @MikeG That works..