Python Recipe

stainlessteelra
stainlessteelra Registered Posts: 11 ✭✭✭✭

Ignore the python input dataset validation.

Is this possible?

I want to run a python script that reads the dataset metadata (description, etc) and outputs to a folder. This would be dynamic based on a user input of a dataset name or all datasets if no name is provided.

working in notebook but validation creates this error in recipe:

Error in python process: At line 206: <class 'Exception'>: Dataset LOGISTICS_DATAUPDATELOG._admin_dataupdatelog cannot be used : declare it as input or output of your recipe

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,590 Neuron
    Answer ✓

    Reading a Dataset using the proper API methods will not produce this error which can indeed be bypassed. But your best solution is to use the dataikuapi which will not validate the recipe inputs. This should give you a good sample:

    client = dataiku.api_client()
    project = client.get_project('project_key')
    dataset = project.get_dataset('dataset_id')
    dataset_settings = dataset.get_settings()
    print(dataset_settings.get_raw())
    
Setup Info
    Tags
      Help me…