Exporting project gives connection not found error

Musketeers
Musketeers Registered Posts: 1 ✭✭✭

Hi, In Dataiku, I am trying to export a project from project home page --> action --> Export project.

It seems that one of the connection to a dataset is deleted because of non use or some other reason.

Is it possible to export this project without that dataset connection.

Answers

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker
    edited July 17

    Hi,

    In this case, you should identify the stale connection and update the respective dataset/s to a working connection or a dummy connection that exists as you can later remap these when importing the project.

    The error should indicate the connection name to list all datasets using that connection you can run the following in a Notebook :

    import dataiku
    client = dataiku.api_client()
    
    # Get project using the ProjectKey
    proj = client.get_project('project-name')
    
    # List all datasets within the project
    my_list = proj.list_datasets()
    # set name of the connection that is missing
    bad_connection = "name-of-deleted-connection"
    
    # For each filesystem managed dataset, change connection to new filesystem connection
    for my_data in my_list:
        dataset = proj.get_dataset(my_data["name"])
        my_def = dataset.get_definition()
        if my_def["params"]["connection"] == bad_connection:
            print(dataset.dataset_name)

    Then you can edit the connection to a valid connection for the dataset names that are printed.

  • JulienD
    JulienD Registered Posts: 3

    Hi
    I have the same issue, but in a python script (using the API)

    Can I force the export ?

    Or should I find the dataset and replace its connections, but then can I replace it with "None" or empty ?

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker

    Hi @JulienD

    You can create dummy connection that doesn't necessarily work of the same type but you should update the missing connection before exporting with code or manually.

Setup Info
    Tags
      Help me…