dataiku API designer support upload files?

https://community.dataiku.com/discussion/12910/how-to-upload-a-file-through-api-designer
is same question like this one,
in 2021, You are correct that API services will only accept the query parameters as JSON objects, so uploading a file using multipart/form-data is not possible at the moment.
I not sure now is 2025 any update about this question…
I want to create an API by dataiku API designer, and other system can post csv file to this API, and API do some calculation then return calculation result,
our data is very complex, not easy convert to json format,,,
I could write a flask API and works well,
but I'm not sure, whether dataiku API designer support upload files now(support API body form-data),
if support, is there any sample code for reference?
thanks a lot
Operating system used: windows
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,248 Neuron
Dataiku API services do not currently support uploading files. As suggested by the post you mentioned you can develop your own webapp which can upload files if you need to have a GUI and users need to use it:
https://developer.dataiku.com/latest/tutorials/webapps/standard/upload-file-kb/index.html
Another option if a GUI is needed is to use an application tile in application designer to upload a file to a dataset:
https://doc.dataiku.com/dss/13/applications/tiles.html#upload-file-in-dataset
If no GUI is needed you can always use the upload_stream() method of the dataiku Python API to upload the file to a Dataiku Managed folder so you can process it.
I would warn you that this pattern is not a good idea. A Dataiku API service is meant to be used for "live" scoring. This means that you give it a simple data parameters and a quick model can "score" this data and return a prediction score. It is not really meant for "batch" scoring. For Batch scoring you should really be using a flow, a scenario and deploy your project to the Automation node. A CSV file really fits that pattern since it can have multiple rows that need scoring and data needs to be transformed before it can be scored. As such a "live" API is not really suitable for workloads that may take an undetermined amount of time. Do note that "batch" scoring can be comletely driven from Dataiku Python API calls so you can control if you want your batch scoring from another system. Do keep in mind that batch scoring using scenarios does not support multiple concurrent flows running at the same time. So if your solution needs that you will need to look at Dataiku Applications to allow for multiple instances of your code to be executed concurrently.