Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
As of now, Presto connection established in Dataiku to access from Database. but how can we retrieve those connection details into jupyter notebooks as variables to use them for making another connections.
Thanks in Advance.
I am not really sure what you are trying to achieve here so can you please describe your requirement properly? If you have a Dataiku connection then you would normally create datasets from that connection on the flow and then create recipes that update those datasets. Then on a Jupyter Notebook you can access these datasets.
Let me explain the problem clearly,
1)We have presto connection to access Database by providing all required details.
2)Able to create datasets and load data from database.
3)now want to retrieve the presto connection details like credentials and port number and host details in jupyter notebook for another purpose.
will it be possible ?
Thanks in advance.
another purpose means, want to invoke external(API/DB) connection with same Presto connection details.
like conn=api.connect(host= ,port= ,auth=(user,password)
here in conn() host, port ,auth details need to same as Presto connection details.
So how can I fetch those details into jupyter notebook or python recipe ?
Yeah this should do it:
import dataiku client = dataiku.api_client() connection_handle = client.get_connection('some_connection_name') connection_definition = connection_handle.get_definition() print(connection_definition)
Thank you. I am able to fetch Presto connection details in Jupyter notebook.
But when I try to invoke API connection using same Presto details, getting error as Dss connection has no attribute cursor.
my code as below:
conn=(provided all details from connection_handle)
conn.cursor() #here I am getting error like Dss connection has no attribute cursor.
So how can we make cursor() available for Dataiku to interact with other connections?
or can we make any changes to existing Presto connection which also enable cursor() functionality?