Unable to create programatically managed MySQL datasets

Options
Marek
Marek Registered Posts: 17 ✭✭✭✭
edited July 16 in Using Dataiku

Hi,

How to create in DSS programatically the managed MySQL datasets?

Unfortunately the documentation for Creating a new SQL managed dataset seems to be outdated or it refers to some non existing methods:

builder = project.new_managed_dataset("mydatasetname")
builder.with_store_info("mysqlconnection")
dataset = builder.create()

returns an error:

AttributeError                            Traceback (most recent call last)
<ipython-input-20-0ed36f389c96> in <module>
      9 except:
     10     # Create dataset (assuming exception was that dataset does not exist)
---> 11     builder = project.new_managed_dataset(dataset_name)
     12     builder.with_store_info(mysql_conn)
     13     dataset = builder.create()

AttributeError: 'DSSProject' object has no attribute 'new_managed_dataset'

Answers

  • Marek
    Marek Registered Posts: 17 ✭✭✭✭
    Options

    I think I found an answer – the valid method name in DSS 8.0 is new_managed_dataset_creation_helper().

    There was also a typo in the documentation example – in the following line the correct method name is with_store_into() instead of with_store_info()

    Can someone correct the documentation, please?

  • arnaudde
    arnaudde Dataiker Posts: 52 Dataiker
    Options

    Hello Marek,
    Thanks for raising the issue and taking the time to find the right method names.
    I can confirm that new_managed_dataset_creation_helper() and with_store_into() are the right names. We will update the doc accordingly.
    Best,
    Arnaud

Setup Info
    Tags
      Help me…