Extracting Dataset names?

Mrcello89
Mrcello89 Registered Posts: 5

Hi everyone,

This may seem a trivial questione, but do you know if there is a way to export all the tables'names for the Dataset list provided in the screen 'Dataset' G+D?

Thnaks for help.

Answers

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
    edited July 17

    @Mrcello89

    Welcome to the Dataiku Community. We are glad to have you join us.

    If you are able to do a little bit of Python Coding this thread here in the community might be of some help.

    https://community.dataiku.com/t5/Using-Dataiku/List-of-all-project-and-respective-tables-in-dataiku/m-p/23480

    Also from this thread https://community.dataiku.com/t5/Using-Dataiku/How-to-get-a-list-of-the-datasets-in-a-notebook/m-p/3737. I adapted the following code. Note this provides a lot of data on each dataset.

    # -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
    # -*- coding: utf-8 -*-
    import dataiku
    import pandas as pd, numpy as np
    from dataiku import pandasutils as pdu

    # -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
    project_name = "FF_TYPICAL_DATA_CLEANUP" # You can find this in the Project URL

    client = dataiku.api_client()
    project = client.get_project(project_name)
    datasets = project.list_datasets()

    # -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
    # Write recipe outputs
    output_data_set_name = "test" #This can be found on the right side of a Python Code Recipe Screen

    test = dataiku.Dataset(output_data_set_name)
    test.write_with_schema(pd.DataFrame.from_records(datasets))

    Hope this helps a bit.

Setup Info
    Tags
      Help me…