Ready for Dataiku 9? Try out the Crash Course on new features! GET STARTED

API endpoint w/ access to dataframe in memory

adamwelly
Level 1
API endpoint w/ access to dataframe in memory

Hello,

I want to create a python function API endpoint that has access to a large pandas data frame in memory. I do not want to read the same data into a dataframe every time a request is made.

Is this possible? If so, how is best to do this?

It would be too slow to do as suggested here:

https://community.dataiku.com/t5/Using-Dataiku-DSS/DSS-API-Designer-Read-dataset-from-DSS-flow-in-R-...

Thank you,

Adam

0 Kudos
1 Reply
fchataigner2
Dataiker
Dataiker

Hi,

you can build the Pandas dataframe outside the api_py_function(). This means the dataframe is only loaded once, when the endpoint is started.

0 Kudos
A banner prompting to get Dataiku DSS