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!
I need an API endpoint with many parameters (like start_date, end_date, order_by ...), I know DSS can support SQL query with a dataset stored on MySQL or another DBMS, but I need to compute and process more than what MySQL function does, can I use the MySQL connection from the Python function endpoint? with some python library, thank for your help
Hi @manhnam91 ,
From what you are describing, it appears that you are trying to create a Python function endpoint to be deployed on your API node to interact with the dataset sored on MySQL, correct? Unfortunately, it is currently not possible to use the "Dataset" APIs in an API node endpoint as the API node is an isolated environment and thus not connected to the Design node. Therefore, API node Python will not be able to interact with datasets from the Design (or Automation) node.
However, suppose this function will always be using a particular dataset. In that case, you may be able to reference the source SQL data or "bundle" the data, in which this data or table from the underlying SQL database could then be used by the API node directly:
https://doc.dataiku.com/dss/latest/apinode/enrich-prediction-queries.html#bundled-data
Hopefully this helps, although let me know if I've misunderstood the question.
Best Regards,
Vitaliy
Hi @manhnam91 ,
From what you are describing, it appears that you are trying to create a Python function endpoint to be deployed on your API node to interact with the dataset sored on MySQL, correct? Unfortunately, it is currently not possible to use the "Dataset" APIs in an API node endpoint as the API node is an isolated environment and thus not connected to the Design node. Therefore, API node Python will not be able to interact with datasets from the Design (or Automation) node.
However, suppose this function will always be using a particular dataset. In that case, you may be able to reference the source SQL data or "bundle" the data, in which this data or table from the underlying SQL database could then be used by the API node directly:
https://doc.dataiku.com/dss/latest/apinode/enrich-prediction-queries.html#bundled-data
Hopefully this helps, although let me know if I've misunderstood the question.
Best Regards,
Vitaliy
many thanks for your support, I will try to implement the API with a SQL database, accessible from the API node