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!
I'm receiving this error when I try to create a managed folder in Python:
"
Here's my code:
# -*- coding: utf-8 -*-
import dataikuapi
# Define the client, project, and dataset handles
host = "xxx"
apiKey = "xxx"
client = dataikuapi.DSSClient(host, apiKey)
project = client.get_default_project()
client._session.verify = False
# Define the dataset name and folder paths
dataset_name = "user_defined_meanings"
source_file_path = "/tmp/UDM/meanings_def/UserDefinedMeanings.csv"
folder_path = "/app/dataiku/user_defined/MANAGE_UDMS/definitions/"
# Create the dataset folder if it doesn't exist
if not project.get_managed_folder(folder_path):
project.create_managed_folder(folder_path)
# Create the dataset
dataset = project.create_dataset(dataset_name, folder_path, "ManagedFolder")
# Upload the csv file
with open(source_file_path, "r") as f:
dataset.upload.data(f.read(),format="csv")
What am I doing wrong?
Operating system used: RHEL 7.9