Question

Microservice as part of Yellow Belt Certification Syllabus

  • 12 December 2022
  • 8 replies
  • 115 views

Hi,

As building Microservice is the part of Yellow Belt Certification syllabus.

As this exercise in not the part of the lab provided by Streamsets Academy, would like to know is there any REST API built-in the Strigo lab environment?

If yes, what is the end point for the same?

Looking forward to your reply.

 

 

Regards,

Ankur

 


8 replies

Userlevel 4
Badge

@Ankur 

 

You can find more about Microservice pipelines here:

https://docs.streamsets.com/platform-datacollector/latest/datacollector/UserGuide/Microservice/Microservice_Title.html

 

Let me share with you a sample pipeline.

Userlevel 4
Badge

@Ankur 

Here is the pipeline. It is from an older version so you might have to update the stages.

HI,

 

Please share a sample REST API building pipeline.

I tried to follow the below video but access to GEO IP db is not given.

https://www.youtube.com/watch?v=Qm5e574WoCU&t=226s

Userlevel 4
Badge

@Ankur you can download the Geolite-City mmdb file from here: https://github.com/P3TERX/GeoLite.mmdb

Hi @saleempothiwala 

Same pipeline I had already built but thar is not working as /rest/v1/user end point is not defined as this was my question in the first place that in the exam this end point will be already defined or not?

If yes then there is no tutorial how to build this end point.

Userlevel 4
Badge

@Ankur 
Run the pipeline that I shared

Then create a new pipeline or use python code to invoke the microservice.

In my case, I created a simple pipeline with HTTP Client. This then calls the microservice pipeline and gets data as returned by HTTP Router where /rest/v1/user is used to decide which branch fulfils the request.

 

 

Everytime you invoke the API, you will see record being generated.

 

The TEST pipeline looks like this:

 

 

Preview shows this:

If I want to create a new endpoint called /rest/v1/saleem that queries a database and send the data back as response then I can add a new route GET /rest/user/saleem

 

Thanks @saleempothiwala . Will try it.

Reply