DSS project from webapp

Solved!
ananth
Level 3
DSS project from webapp

can we create project from webapp? when clicking on submit?

0 Kudos
1 Solution
Alex_Combessie
Dataiker Alumni

In Python 2, unicode strings are prefixed by "u": https://docs.python.org/2/howto/unicode.html.

In Python 3, there is no prefix, since there is a built-in str type which is stored as unicode: https://docs.python.org/3.6/howto/unicode.html

In both cases, you can safely pass a list of strings from the backend to the frontend.

View solution in original post

6 Replies
Alex_Combessie
Dataiker Alumni

Hi,

Creating a project can be automated using the Dataiku Public API: https://doc.dataiku.com/dss/latest/python-api/rest-api-client/projects.html

Could you detail what you are trying to achieve with this web app? Perhaps there are other methods you could use, such as project creation macros.

Hope it helps,

Alex

0 Kudos
ananth
Level 3
Author

HI @Alex_Combessie ,

 

we are creating UI in web app to get inputs from user and in the UI we have submit button to get all the users input data and create project (currently we are manually creating project) 

 

Thanks,

Ananth

0 Kudos
ananth
Level 3
Author

Hi @Alex_Combessie ,

 

we tried using project creation macros but that UI is not customize-able so we decided to go with custom UI from webapp , can we create projects from webUI? and configure dataset

0 Kudos
Alex_Combessie
Dataiker Alumni

Hi,

In your webapp, you can code a backend function calling the Dataiku API to create projects: https://doc.dataiku.com/dss/latest/python-api/rest-api-client/projects.html

Note that you can also configure the UI for project creation macros  by setting the params field in runnable.json (cf https://doc.dataiku.com/dss/latest/plugins/reference/project-creation-macros.html)

Best regards,

Alex

0 Kudos
ananth
Level 3
Author

Hi @Alex_Combessie ,

 

thank you i tried the API client as below, when i tried to print its prefixed with 'u' [u'"key1",u'"key2"] any suggestion on removing this?

 

import dataiku
client = dataiku.api_client()
lstprojectkeys = str(client.list_project_keys())

print(lstprojectkeys )

0 Kudos
Alex_Combessie
Dataiker Alumni

In Python 2, unicode strings are prefixed by "u": https://docs.python.org/2/howto/unicode.html.

In Python 3, there is no prefix, since there is a built-in str type which is stored as unicode: https://docs.python.org/3.6/howto/unicode.html

In both cases, you can safely pass a list of strings from the backend to the frontend.