Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I am looking for an API which will help me to extract the Connection Details of all Dataiku projects and the username mapped to it.
Basically i am looking for Snowflake connection and SYS username mapped to it in all the Dataiku projects.
Is it possible to extract these details?
Thanks in Advance
You can list all connections from all projects if that is what you are looking for using :
import dataiku import pandas as pd, numpy as np import pprint pp = pprint.PrettyPrinter(indent=4) connections = client.list_connections() #pp.pprint(dss_connections) for connection in connections: connections[connection] = client.get_connection(connection) connection_definition = connections[connection].get_definition() try: if connection_definition['type'] == 'Snowflake' and connection_definition['params']['user'] == 'SYS': print(connection_definition) except Exception as e: print(e)
This would list all the connections details where it's snowflake and username SYS.
You can then print out the name of the connection and use the functionality found under :
Administration - Monitoring - Per-connection data to find out their usage in a project.
Please note you will need Admin privileges to list all connections.
Yes, you can simply use :
connection_definition['params']['warehouse'] that will be the value of the warehouse you can filter of print as seen in the sample code.
Let me know if you have any issues.