PostgreSQL Store-and-Forrward - postgresql

I'm building a data collection RESTful API 0 External devices will post json data to database server. So, my idea is to make it by Store-and-Forward ideology.
At the moment of the post, it will store raw json data to table with timestamp and processed true/false fields.
At the next moment when(if) the db server is not loaded will run some function, trigger or stored procedure, etc. The idea is to process all json data into suitable tables and fields for charting graphs/bars and map it over Google Maps later.
So how and what to use to run this functionality(2) when the db server no loaded and free for processing the posted json data?

Related

How to combine data from postgreSQL and dynamic json in grafana

I have a grafana dashboard where I want to use an orcestra cities map dashboard to show status of some stations. The status is available as json from a http server (using nagios for this part) but the status has no idea of the location of the stations. This I have in a postGIS database.
I know I can set up a script that reads the status json and inserts the data into a table in the postgis database. This can run each five minutes or something. This feels a bit kludgy, so I wonder if there are some other ways of doing this.
Could it be possible to use a foreign data wrapper to fetch the json into postgis? The only json fdw I have found is to read a set of files, I would need to read from a http server.
If not, is it possible to combine data from json and postgres in one data set in grafana? I can read in data from both sources and present them e.g. as time series in one panel, but here I need to be able to join the two so that I use some of the attributes from json to categorize the points from postgis (or the other way around if that should be easier)
In theory you can do that in the Grafana. You need to have 2 queries with results from both sources (how to write query, configure datasources for that is not in the scope of this question) + you need a key, which can be used for a join in both results (e.g. city_id).
Then you may use join transformation to "join" both query results into single dataset.

Save Form recognize scanned data in Database table

After scanning my document with #AzureFormRecognizer[fott-preview.azurewebsites.net], How I store this field and data in oracle/MS server database. I see https://learn.microsoft.com/en-us/azure/data-factory/connector-oracle but couldn't understand those things. Please help me
Form Recognizer output is a JSON output, you can use Logic App or Power Automate database connectors to take the JSON output into a database.

How would you achieve local data persistence in Flutter when remote versions of the same data are returned as nested JSON objects?

When the server stores data in a MongoDB database and is accessed through GraphQL, it would be cool if local/cached versions of the same data could be stored similarly - in some sort of local NoSQL data store.
However, from my research it looks like there aren't that many data persistence options available in Flutter and the best one available is SQFLite. If I use SQFLite, though, I have to wrangle different formats of the same data - the nested-object NoSQL/GraphQL format and the "separate objects joined through relations" format of SQL.
Has anyone dealt with this before? Even if you're not using MongoDB/GraphQL in your remote backend, your API likely still returns nested objects which can't be stored as-is in your local SQL DB and can't be used interchangeably with their locally persisted versions.
So how would you deal with this issue and achieve clean syncing of local and remote data without it turning into a mess?

What is the best way to convert a JSON object to be inserted in SQL Server

I'm new to Mule Studio and am running a query against a MySQL database, converting the object to JSON and then mapping it to the columns in a SQL Server database that I am pushing the data to.
However, I am not sure about the best way to handle the mapped JSON. Can I insert the JSON directly into SQL Server or does it need to be converted to an object first?
Your question seems revolving around JSON and database storage.
First you need to decode JSON data (in php there is json_decode), for mule studio look at this documentation. It looks like you should use #JsonAutoDetect.
As for storage on database, the data type of a variable should match that with the field.

How to insert data coming from web service into sql database in iphone?

I am developing an app where I need to insert data coming from web service into sqlite3 database.Web service returns XML data with 5 tags.Now after XML parsing how to insert parsed data into sql database?
Can I code for this???
Thanks in advance..
Inserting XML data in sqlite database is no different that inserting any data. So there are 3 parts of the problem you are trying to solve:
Calling the web service and getting the data
Parsing the data and populating some object
Inserting that data in sqlite database which has columns as per your object structure
NSURLConnection and NSXMLParser are the classed you need to look at for solving first 2 problems. Third one would be solved using sqlite library. Without more information about object structure it is difficult to suggest anything else. But you should find enough documentation on using sqlite if you search around.