Usecase: Here, we will create a reusable component or integration which will take any data XML or Json or etc as binary data and simply save as Text to database table as clob type.
Follow my below blog how to save XML or Json file into stage and then save the request payload into Database table as clob type.
- Create a database table with payload column as clob type.
- Create a rest trigger and database connection.
- Create an app driven integration and configure the rest trigget and request payload format as binary.
- Configure the database table to insert the payload.
- Map the binary request payload to database payload using decodebase64(encodeReferenceToBase64(Stream Reference) functions (Basically we are converting the stream reference to base64 data and then decode the base64 data).
CREATE TABLE OIC_TRACKING(
Id INTEGER PRIMARY KEY,
Detailed steps with screenshots: