Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

Programmatically List Tables in Connection

Level 2
Programmatically List Tables in Connection
From a Python notebook, is there a way to list all of the tables contained in a Connection?
0 Kudos
2 Replies
Developer Advocate


Here is a little script that returns a dictionary of the different connections and a list of datasets contained in those connections. This script uses the DSS Public API (for more in formation on the Public Api see the documentation).

Note that it won't list tables of a connection that are not datasets in DSS. 


from dataikuapi import DSSClient

from collections import defaultdict

api_key = "your-api-key"

host = "DSS-host"

client = DSSClient(host, apiKey)

def get_datasets_per_connection(client):

    datasets_per_connection = defaultdict(list)

    projects = client.list_project_keys()

    def get_connect(data):

        return data.get('params').get('connection')

    for project in projects:

        for dataset in client.get_project(project).list_datasets():



    return datasets_per_connection


0 Kudos
Level 2
Thank you Jean, although I am looking for a solution that does not require the tables to be Datasets in DSS.
0 Kudos