Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
I need to export the list of connections and the users who have access to these connections. There is an Authorization Matrix that can be exported for projects, but for connections?
Sincerely
Fabrice
Operating system used: RedHat
There is not such Matrix available in the UI.
You can use the Dataiku API to build something similar , not you would need to run this with Admin user:
import dataiku
import pandas as pd
# Get a list of connections
client = dataiku.api_client()
dss_connections = client.list_connections()
# Initialize lists to store the values
connection_list = []
allowed_groups_list = []
# Iterate over the connections and extract the relevant values
for connection in dss_connections:
conn = client.get_connection(connection).get_definition()
if conn['usableBy'] == 'ALLOWED':
allowed_groups = conn['allowedGroups']
else:
allowed_groups = ["ALL"]
connection_list.append(connection)
allowed_groups_list.append(allowed_groups)
# Create a dataframe with the extracted values
df_connection = pd.DataFrame({
'connection': connection_list,
'allowed_groups': allowed_groups_list
})
# Explode the 'allowed_groups' column
df_connection = df_connection.explode('allowed_groups').reset_index(drop=True)
df_connection
Thanks
There is not such Matrix available in the UI.
You can use the Dataiku API to build something similar , not you would need to run this with Admin user:
import dataiku
import pandas as pd
# Get a list of connections
client = dataiku.api_client()
dss_connections = client.list_connections()
# Initialize lists to store the values
connection_list = []
allowed_groups_list = []
# Iterate over the connections and extract the relevant values
for connection in dss_connections:
conn = client.get_connection(connection).get_definition()
if conn['usableBy'] == 'ALLOWED':
allowed_groups = conn['allowedGroups']
else:
allowed_groups = ["ALL"]
connection_list.append(connection)
allowed_groups_list.append(allowed_groups)
# Create a dataframe with the extracted values
df_connection = pd.DataFrame({
'connection': connection_list,
'allowed_groups': allowed_groups_list
})
# Explode the 'allowed_groups' column
df_connection = df_connection.explode('allowed_groups').reset_index(drop=True)
df_connection
Thanks
It's working ๐
Thanks for your help
Fabrice