Sunday, 19 April 2020

Oracle ICS, quering a database with parameter

In this post we will query database and will execute the query with the parameter provided by the rest interface.  This post require a multiple setup to be completed.

1. We should have rest integration with parameter  - Use this link to create. 

2. Database connection should be configured and created. - Use this link to create


Once above 2 configuration is completed, we can now move towards creating a integration with the database connectivity.


1.  Now  open the integration created in the Step 1.  Once integration open the click on the + Sigh in the integration flow between the map and first activity,  and choose the database connection. Once done it will open the database adapter configurations.  In this provide

     1. Name - Name of the database adapter.
     2. Description - Not mandatory.
     3. When we want to do with this database connection - I opt for select with table.



2.  Now select the schema and table table and also table name for the selection you can select multiple table and then you can import table, post selection. 



3. Now query is been built and you can use the expression builder to add and use parameter for the query. I have opt amt to and amt from in the query. 


4. Once done review the configurations and then click on save. 



5. Now map the query parameter, these query parameter is coming from the rest interface. Hence queryParam1 is been mapped to amount from and queryParam2 to amountTo.  Once done close it. This is how we provide query parameter value to query. 


6. Now last configuration is we need to map the result to output, for this we need to open the last map option and then need to map the node and then attribute under the node as given below. 




7. Now integration is ready for the testing, save the integration and come to the first page. switch the integration for active. Once integration is active, its not possible to make any change.  It will take some time and it will be ready to service.  If it will take some time manually refresh the page. 




 8. Now integration is ready for testing, use the URL coming for the testing. There is a requirement of the credentials, these credentials are same which is been given in point 1 during the configuration of rest service.






I have used postman to test the REST API, you can choose some other tool also for testing. 

No comments:

Post a Comment

Feature Selection in AI

In artifical intelegance/machine learning, everything start and end with data and in current world everyday by using facebook, insta we all ...