Validate projectKey and scenarioId before calling API to run scenario

Options
mahbh2001
mahbh2001 Registered Posts: 4

Hi

I want to configure my application to run scenarios in Dataiku.

How can I validate projectKey and scenarioId as valid strings for configuration?

I want to reject any malformed value upfront rather than calling expensive API.

regards

Mahesh

Answers

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker
    Options

    Hi,

    You could do some regex validation initially like "/^\w+$/" for project key and /^[A-Za-z0-9_]+$/ for scenario ID.

    This would not validate if the project key and scenario ID actually exist. You would need to make an API call to determine that.

    Thanks

Setup Info
    Tags
      Help me…