Dataiku connector

Solved!
Blossom
Level 1
Dataiku connector

Hello the community,

Right how I'm developing a dataiku connector. Here are some problems that I met:

  • When the input is a Dataset type which can be configured in "params" of the json file, how do I pass an existing dataset?  When I pass an existing dataset, it's str type. If I use dataiku.Dataset(dataset_name(which I can get from that interactive page generated by json file)) , it will give me an exception saying that "Dataset XXX is specified with a relative name, but no default project was found. Please use complete name". My question is : is this the right way to pass a dataset?  And if so how can I get the current project_key ? Becuase when I write the project key hard coded, it gives me an exception "no dss url or api key found from any location"  

 

0 Kudos
1 Solution
fchataigner2
Dataiker

Hi,

in DSS terminology, a connector would be a dataset type, so you're probably actually referring to a plugin recipe?

In a plugin recipe, you define roles in the recipe.json, which get used in the recipe creation modal to let the user chose or define datasets. Then you use `get_input_names_for_role(...)` to get dataset names from the role names you have defined in the json, and do `Dataset(the_dataset_name)` as usual to get a handle on the dataset. You're not supposed to use parameters of type DATASET(S).

View solution in original post

0 Kudos
4 Replies
fchataigner2
Dataiker

Hi,

in DSS terminology, a connector would be a dataset type, so you're probably actually referring to a plugin recipe?

In a plugin recipe, you define roles in the recipe.json, which get used in the recipe creation modal to let the user chose or define datasets. Then you use `get_input_names_for_role(...)` to get dataset names from the role names you have defined in the json, and do `Dataset(the_dataset_name)` as usual to get a handle on the dataset. You're not supposed to use parameters of type DATASET(S).

0 Kudos
Blossom
Level 1
Author

Thank you so much for you reply๐Ÿ˜

0 Kudos
surajtr
Level 1

Hi,

I am facing exactly the same issue. There is no recipe.py in my plugin. Only connector.py. How to fix it ?

0 Kudos
fchataigner2
Dataiker

if you have a connector.py, that means you're in a "plugin dataset" component, not a "plugin recipe". To make a plugin recipe, you need to start from a regular recipe and convert it to a plugin recipe in its "actions" tab (cf. https://doc.dataiku.com/dss/latest/plugins/reference/recipes.html#component-recipes)

0 Kudos