Write back data to the source in Project Siena app - siena

I have a requirement to save data added by the user to a server. Is there any way to write back data to the source? or to somehow send the data to an azure server in project siena

Related

Published report can't connect to data source after I change the data source

I updated a report with embeded data, from SQL Server, to our company's Tableau Server. It worked perfectly. After that, the old SQL Server is going to be demised, thus I move all data to a new server, the database, schema and data are exactly the same, and update the data connection in my local reports. It still works well.
Then I publish it again with the same configuration. The publishion is successful. However, Tableau server shows error that the database can't be connected when I open the report. Any idea? Thanks in advance.
I just update the server, username and pass for all data connections.
Exception
If you are working from a published data source and you change information, such as the server connection details, you should re-upload the new data source - you may wish to also delete the old data source to avoid confusion.
The issue is because the Tableau Server does not have access for extracting data from the new server. Our Tableau Server will need a new account for the new server to extract data I needed. Thus, I need to raise a ticket to create such account.

Export Data from CloudKit

I am interacting with the cloudkit dashboard and looking at data collected by my app.
How can I export all the data from the dashboard (data-> csv or json) so that I can do some analytics on it?
Thanks!
I don't think Apple will ever provide an export feature.
The system is capable to collecting more than 40 events per second. This could very quickly be massive amount of data.
Instead there is a possibility to query the system via an API, so you can build an external website to query your results and possibly export your data from there.
Here is how I export my iCloud data on my Mac using this wonderful DB browser called DB Browser for SQLite.
I run my app on Simulator. The app syncs with iCloud and downloads both public and private databases. Once the sync is complete I have all the data on my simulator. The data is essentially in SQlite format stored in a file which I locate using command in my app:
print("\(NSHomeDirectory())/Library/Application Support/")
and the result is something like:
/Users/zeeshan/Library/Developer/CoreSimulator/Devices/34A4ADC6-1B67-4339-B67F-C4B6DDA46B07/data/Containers/Data/Application/E8F9486B-B40B-47D0-84C1-1043241E68EA/Library/Application Support/
And here .sqlite file is saved. In my case I have two files, private.sqlie and public.sqlite which is how I have named them in my code.
Now I open these files in DB Browser for SQLite. And then rest is simple, just export the opened file as you would do for any SQlite file.
Attached are the screenshots.

Write Data from Model back into json File UI5

Is it possible to write Data from an UI5 JSON Model back into a local JSON File.
Maybe by using: new sap.ui.core.util.MockServer({....
The MockServer emulates an OData Service and there it should be possible to save Data.
Since you are working in a browser you cannot access the file system. You will have to either implement a back-end service that saves your data or you can save the data from the JSONModel in local storage.
With local storage the changed data will of course only be available in the browser where you saved it.
See for example
https://developer.mozilla.org/en/docs/Web/API/Window/localStorage
https://openui5.hana.ondemand.com/#docs/api/symbols/jQuery.sap.storage.html

iOS saving core data to server/cloud

I'm using core data in our iOS universal application and want the ability for the user to back their data up to our server. So they can log in with another device and pull down that data to that device. Has anyone got any advice on this? I want to analyse the data at the server to synchronise information with our stores as well, so the data must be readable via the server end as well.
I want to send the entire core data store over in one push, so will be an XML mashup of entities from the core data store that will be deciphered on retrieval.
How can I do this?
Have accomplished this using GDataxml to build the xml string and push it through a web service at the server end. Performance is great.
Your duplicating some iCloud functionality here. Why not leave the cloud storage and retrieval to iCloud and then when the app starts, synchronise with your server

Syncing iOS Core Data with remote server which sends XML

My app parses XML from remote server and store the objects in Core Data(SQLite storage). So that user can browse the material when OFFLINE by reading from local storage.
User may make changes to objects when browsing offline which gets stored locally in Core Data SQLite store. Another User makes some changes to object on Remote server and it is stored there. Now when I detect internet connection, my app should sync my local storage with remote server. Which means remote server is updated with changes I made to my Core Data(SQLite storage) when I was offline and my local storage - Core Data(SQLite storage) needs to be updated with what ever changes other user made to remote server.
For example there is a forum and it is stored in my local storage so that I can read and reply when I am traveling. When later on internet is accessible. My app should automatically put all my replies stored in core data to remote server and also bring other posts on remote server into my local storage.
Remote server is sending XML which I'm parsing and storing in Coredata. My problem is how to sync it ?
How both ways communication happens when there is a change?
How to sync only data which has changed and not to IMPORT whole remote server DB and vice-versa ?
I know one of the way to do it..
add one more field to your local and server database. i.e. Timestamp.
when user change data on the local database change the Timestamp to current time.
do same on the server..i.e. When someone edit data on the server change Timestamp to current time.
When user connects to internet... check local Timestamp to Server timestamp..
case 1 Both are same - Nothing to do
case 2 local time > server time - use sql to get all the data having timestamp greater than server timestamp.. and upload it on the server...
case 3 local < server .... get all the records greater than the local timestamp and add it to the local database..
I am not sure if there is any better way... but this surely works...
One solution could be
iphone syncs the changes to the server
server merges the new and old stuff
iphone gets the new changes (from the merge) from the server
So let the server be the master which should know how to merge stuff and the clients should only download the data incrementally after some changes.
Transactions. You want to follow the ACID rules for transactions. Essentially you have to make sure that data has not be updated that you have not refreshed locally before altering your local write to update.
So the easiest way is have a user get the most recent update from the server, then overwrite that and make sure that with timestamps no othe update happens during that process. Even better yet, use blocking with threads to insure that nothing else happens.
If you Google transactions or ACID there will be a lot of info out there. It's a big area in RDBMS environments where many users can corrupt the data and locks must be held between writes and updates.