Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on October 31, 2024 1:59PM
Likes: 0
Replies: 4
Hello, I am trying to duplicate a project and have set a new project key "NEW_KEY" for the copy. When I try this I get the following error:
Project key NEW_KEY is already used. Please check that you have not already imported this project.
Since the message states the project already exists I tried accessing it (via the URL /projects/NEW_KEY). This gave me the message below. I do not believe I am missing permissions as I have admin rights so I think there is something going wrong.
I cannot delete the project via the API because it cannot find the project using the key, but I also cannot create a project with the key because that gives me the first error message saying the key is already in use.
Is there a way for me to delete this key and create the project still? Many thanks to anyone who might be able to help out!
Operating system used: Windows
There are a couple of things that could be going on here:
import dataiku
client = dataiku.api_client()
client.list_global_api_keys(as_type='listitems')
Thanks for the response. The code you provided does not give an error but returns an empty list, does this mean I am not using an admin API key? If so how do you specify an admin API key?
Regarding the case sensitivity, how do you know if my project key has the incorrect case? If I search for the project in the project overview it does not show up, and this search seems to be case-insensitive. This could still be because of admin permissions though
If you can run the code snippet then you are an admin. Have you checked your [dss data dir]/config/projects folder in the DSS machine? This will give you the correct case of the project key. You can also check all project keys using this code snippet:
import dataiku client = dataiku.api_client() project_keys = client.list_project_keys() for project_key in project_keys: print(project_key)
In that case I can confirm I am indeed an admin. I used the code to print all project_keys and the NEW_KEY is not listed there. Since I cannot create a project using that key I assume something is going wrong. I imagine I do not have a way to drop this project key via the API, what do you think?
If so the only option might be deleting it by removing the folder within the DSS machine, would that be correct?