Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
I have a shared code library that others use by editing their `external-libraries.json` file. Is there a way for that code library to fetch the project that has imported it?
thx
Operating system used: Windows 10
Hello,
Thank you for your question! You could leverage our python api and retrieve the project key where the library is being run:
import dataiku
current_project_key = dataiku.default_project_key()
If you want the name of the project (not its identifier - the key) , you can run the following:
import dataiku
client = dataiku.api_client()
project = client.get_default_project()
current_project_name = project.get_metadata().get('label')
I hope this helps!
Jean-Yves
Hello,
Thank you for your question! You could leverage our python api and retrieve the project key where the library is being run:
import dataiku
current_project_key = dataiku.default_project_key()
If you want the name of the project (not its identifier - the key) , you can run the following:
import dataiku
client = dataiku.api_client()
project = client.get_default_project()
current_project_name = project.get_metadata().get('label')
I hope this helps!
Jean-Yves