How to specify build mode in custom python script scenarios ?
I have created a custom scenario and want to build datasets with build mode specified.
scenario.build_dataset("my_dataset") --> This builds all the downstream datasets as well, but I want to build only "my_dataset" dataset. In the step-based scenario, I could do by selecting the Build mode as "build only this dataset".
But I wanted to do this in custom python scenario as I want to specify certain conditions on certain datasets.
Best Answer
-
Hey @vaishnavi
,
You can specify the build type in the function's parameter.# Create the main handle to interact with the scenario scenario = Scenario() # Build a dataset scenario.build_dataset("mydatasetname", build_mode='NON_RECURSIVE_FORCED_BUILD')
For more information you can check these links:
- https://doc.dataiku.com/dss/latest/python-api/scenarios-inside.html?highlight=build_dataset#dataiku.scenario.Scenario.build_dataset
- https://doc.dataiku.com/dss/latest/scenarios/custom_scenarios.html?highlight=build_dataset
Answers
-
That really helps me. Thank you @nmadhu20