I have a requirement where we need to send data from tables to PUB/SUB API in JSON formate . for this i tried fetching data from tables using queryentity then converting data to json .While sending we also converting that data to encodebase64string and touniformstring . here the issue is we are unable to send large amount of data because encodebase64string has limit on characters . Is there any alternate way to send data .
Thanks,
Discussion posts and replies are publicly visible
Do you have to encode it in base 64? What's wrong with just sending the json?
yes we need to encode in base64 . because body of json is expected to enocde to there API
There is a way but it is somewhat convoluted.
First you need to store the json in the Database and then query it back using a stored procedure and TO_BASE64 MariaDB function.
mariadb.com/.../
For storing json in Database we have -Load JSON to a database which will accept only document as input . But our case Json is type text . Any suggestion for converting Json text to document
Are you referring to this?
This is not what you need. This is used to parse a json file containing many rows and storing it in a regular table (similar to loading a CSV file with many rows).
If you want to store JSON in a column, its just a question of creating 1 column as an TEXT column in a table and storing the JSON string in there.
i have my Json in expression rule . Now how can i store this to Database table (with text column ) ?
Create a CDT with that column. Add it to a Data Store. Publish datastore to create the table. Then add a node in your process to populate that field with the json and store it in the DB using Write to Data Store.
Thanks for solutions . Will try this way