write_metadata() seems broken

Options
UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker

In my recipe I do:


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

yet I get this in the logs:


[03:44:37] [INFO] [dku.utils] - output.write_metadata(metadata)<BR />[03:44:37] [INFO] [dku.utils] - File "/home/dataiku/dataiku-dss-4.0.8/python/dataiku/core/dataset.py", line 872, in write_metadata<BR />[03:44:37] [INFO] [dku.utils] - "metadata" : json.dumps(meta)<BR />[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<BR />[03:44:37] [INFO] [dku.utils] - return jek_void_call(path, data, err_msg, **kwargs)<BR />[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<BR />[03:44:37] [INFO] [dku.utils] - return _handle_void_resp(jek_api_post_call(path, data, **kwargs), err_msg = err_msg)<BR />[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<BR />[03:44:37] [INFO] [dku.utils] - raise Exception("%s: %s" % (err_msg, _get_error_message(err_data).encode("utf8")))<BR />[03:44:37] [INFO] [dku.utils] - Exception: None: Not Found: /dip/api/intercom/write-metadata<BR />[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 ✭✭✭✭✭✭✭✭✭
    Options

    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")<BR />meta = {"foo": "bar"}<BR />metadata['custom']['kv'].update(meta)<BR />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…