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!
Hey Veeru,
I replied to you on your second post about this subject. ๐
Yes you can handle it by developping your own plugin and create a custom recipe as a visual componant of it.
So, for start you just have to go to the summary tab of your instance right corner > application > plugin > add plugin > write your own instance.
And I suggest you start with this one because I couldn't cover all the other steps in a comment https://academy.dataiku.com/plugin-development
Martin
I think there are few misguided things in your post so I am going to address them all:
import dataiku
client = dataiku.api_client()
# Get a list of Projects
projects = client.list_projects()
def save_project_info(url, username, save_path):
# Make GET request with basic authentication
response = requests.get(url, auth=(username, ''))
# Check if request was successful
if response.status_code == 200:
# Parse JSON response
project_info = response.json()
# Save project information to a new .txt file
with open(save_path, 'w') as file:
file.write(json.dumps(project_info, indent=4))
print("Project information saved successfully to:", save_path)
else:
project_info_fail = response.json()
# Save project information to a new .txt file
with open(save_path, 'w') as file:
file.write(json.dumps(project_info_fail, indent=4))
print("Failed to retrieve project information. Status code:", response.status_code)
if __name__ == "__main__":
project_id = input("Enter the ProjectID/Name: ")
url_path = "http://localhost:11200/public/api/projects/"
final_url = url_path + project_id
username = input("Enter the Username: ")
save_path = input("Enter the local path to save the file: ")
final_save_path = save_path + project_id + ".json"
save_project_info(final_url, username, final_save_path)