write_metadata() seems broken

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker
edited July 16 in Using Dataiku

In my recipe I do:


output = dataiku.Dataset(get_output_names_for_role(df_name)[0])
metadata = output.read_metadata()
metadata['custom']['kv'].update(meta)
output.write_metadata(metadata)

yet I get this in the logs:


[03:44:37] [INFO] [dku.utils] - output.write_metadata(metadata)
[03:44:37] [INFO] [dku.utils] - File "/home/dataiku/dataiku-dss-4.0.8/python/dataiku/core/dataset.py", line 872, in write_metadata
[03:44:37] [INFO] [dku.utils] - "metadata" : json.dumps(meta)
[03:44:37] [INFO] [dku.utils] - File "/home/dataiku/dataiku-dss-4.0.8/python/dataiku/core/intercom.py", line 119, in jek_or_backend_void_call
[03:44:37] [INFO] [dku.utils] - return jek_void_call(path, data, err_msg, **kwargs)
[03:44:37] [INFO] [dku.utils] - File "/home/dataiku/dataiku-dss-4.0.8/python/dataiku/core/intercom.py", line 113, in jek_void_call
[03:44:37] [INFO] [dku.utils] - return _handle_void_resp(jek_api_post_call(path, data, **kwargs), err_msg = err_msg)
[03:44:37] [INFO] [dku.utils] - File "/home/dataiku/dataiku-dss-4.0.8/python/dataiku/core/intercom.py", line 162, in _handle_void_resp
[03:44:37] [INFO] [dku.utils] - raise Exception("%s: %s" % (err_msg, _get_error_message(err_data).encode("utf8")))
[03:44:37] [INFO] [dku.utils] - Exception: None: Not Found: /dip/api/intercom/write-metadata
[03:44:37] [INFO] [dku.utils] - End Python stack

Something is wrong, I think... Anyone can enlighten me?

Tagged:

Answers

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    edited July 17

    Hello,

    We could not reproduce your issue on the latest version of DSS (4.1.2). We ran the following code:


    output = dataiku.Dataset("mydataset")
    meta = {"foo": "bar"}
    metadata['custom']['kv'].update(meta)
    output.write_metadata(metadata)

    with the expected results. Note that we added the line `meta = {"foo": "bar"}`.

    Could you upgrade to the latest version and try again?

    Cheers,

    Alex

Setup Info
    Tags
      Help me…