Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

Using the latest version of file in an API

Solved!
Usersyed
Level 3
Using the latest version of file in an API

Hi all,


I have a python script that is deployed as an API using Dataiku's API designer.
The python script uses a  csv file for some computations. This file is present in a managed folder of my project.

There are cases when this file is changed. To make the Python API use the latest version of this file, I have to redeploy my API every time.

Is there a way to make the Python API use the latest version of the file present in the managed folder without the user redeploying the script?


Operating system used: Windows

0 Kudos
1 Solution
JordanB
Dataiker

Hi @Usersyed,

To automate this process, you could create a Scenario (triggered by a dataset or folder change) and use the following scenario steps:

1. Create API service version

2. Update API deployment

Unfortunately, there is no way to have the file API use a new version of the dataset without performing an update.

Hope this helps!

Thanks,

Jordan

View solution in original post

0 Kudos
6 Replies
JordanB
Dataiker

Hi @Usersyed,

To automate this process, you could create a Scenario (triggered by a dataset or folder change) and use the following scenario steps:

1. Create API service version

2. Update API deployment

Unfortunately, there is no way to have the file API use a new version of the dataset without performing an update.

Hope this helps!

Thanks,

Jordan

0 Kudos
Usersyed
Level 3
Author

@JordanB 

I tried following the steps mentioned here : 
https://knowledge.dataiku.com/latest/courses/mlops/real-time-apis/manage-multiple-api-service-versio...

The API is getting updated on uploading a new version of file in the managed folder.
However, I don't see the change reflecting when I make the API call.

Can you please help me this?

Thanks

0 Kudos
Usersyed
Level 3
Author

@JordanB 
I activated the scenario and its working now.
But the problem is that I have to run the scenario manually everytime by going to the project.

What are the configuration changes I should make to automate this i.e, update the API without the user running the scenario?

 

0 Kudos
JordanB
Dataiker

Hi @Usersyed,

You mentioned that the trigger on dataset change successfully ran the scenario, however, it did not update the API? Am I understanding that correctly? 

Thanks,

Jordan

0 Kudos
Usersyed
Level 3
Author

Yes, you understood it correctly.

Update: Thanks for your help. The issue is resolved now.
I had set the scenario rerun time a bit high, hence couldn't see the changes quickly.

Its working fine now.


 

JordanB
Dataiker

@Usersyed 

Nice! Glad to hear that it is working now 🙂