Retrieving json file from Firebase Storage - json

I would like to be able to get a json file from Firebase Storage to work with. I don't need to push it back.
Does Firebase Storage can give me that and if so, how can I do it with Angular?
If not, does the Firebase database is a better choice?
I already downloaded firebase and angularfire2.
I tried getDownloadURL and getMetadata, but don't know how to get the info inside.
Thanks for your help!

I'd suggest you use the realtime database, I suspect that it will be simpler for you to pick up. The realtime database already stores all of it's information as JSON, so you could simply query the database and get your JSON data... but if you used the Storage portion of Firebase then you'd have to jump through some hoops to actually read the file you get and parse out the data.
Check out this documentation for examples of how to query the realtime database using Angularfire.

Related

Storing and loading data from react-native calendar to a JSON file

I'm currently thinking of a concept for a react-native app where people add events over a period of time like a diary/log. These events need to be exported and for security and privacy reasons I don't want to use a database. I've read you can use JSON files as a storage method, too.
How can I store data from the app to a JSON file and load the data from the JSON file back in the app? Don't need any code, helpful articles or webpages are appreciated
Assuming that you already have all the app data into a json, its rather simple.
Decide where to store the appdata.json, lets call it APP_DATA_PATH
Find a library to read/write files (I've only used expo-file-system)
On app boot, check if APP_DATA_PATH exists, if it does read the file and load into app, if not assume its a new user
Whenever app data changes, write the changes to APP_DATA_PATH

Storing database json file in optimal way for react native app

I’m using react native, redux and firebase and I have a 1 MB database export that contains food nutritional information from the Canadian Nutrition File database.
This data will never change and is used in a FlatList users can search and import from.
What’s the optimal way for me to store this for my users to access as fast as possible when searching?
I am thinking of simply including the json file with my other source files and calling it from there using require.
But since I have firebase and redux all setup I wondered if it made more sense for whatever reason to consider those options instead.
Thanks in advance for any input.
Since you are already using redux, i'd go for adding the json content to the store on app init/mount so you can get it easily from everywhere.
Another options i'd consider:
Import, parse & render the JSON file stactically on runtime (as it never changes);
Use the AsyncStorage to make it available in local database but outsite the redux store thing.

How do I use Pentaho spoon to push data from MySQL database to facebook webpage

1) I have already made transformation mapping for getting data from specific MySQL (Table Input) and convert it as Text File output.
2) Also I have created a facebook developer account page and trying to figure out how the Facebook API works to push data from MYsql to facebook.
3) would appreciate if transformation mapping can be provided. Also I would not like to use XML, instead I would like to use JSON.
Already the msql table is converted to csv file, but I am not sure how to post the csv file to facebook or is there a way to connect mysql table to facebook directly. Please share your ideas or transformation mapping. Thanks
I would Assuemm you are familiar with Facebook Development API to do all actions like post,get and so on.
You have a step called "REST CLIENT STEP" in Pentaho.
you will have an API url to post the data that you want from mySQL. There several methods GET PUT POST DELETE
Also set the Application Format to Json (XML,JSON etc).
I used to read data from FB using REST Client by using GET Method. Work around.

Get Json From Azure Storage Blob

I want to get the json file in Azure Storage Blob through the browser.
I used Stream Analysis and comes out a json file in the Blob container. Now i need to get the information inside the json file in order to show the IOT device status in real-time.
I tried to use Jsonp,
but I don't know how to add the callBack method in the Json file without download it. Is there any way to add the callBack method??
or Is there another way to get the information inside the container?
for this particular scenario, I'd recommend PowerBI. Now Stream Analytics have direct output to PowerBI and you can pretty much customize the dashboard for your real time IoT needs.
You can refer to this article for step by step Stream Analytics + PowerBI.
Coming back to your question, you need to download the blob to access the content. Stream Analytics to BLOB is usually for archiving or later predictive analysis scenarios.
Instead if you still prefer not to use PowerBI, I'd either arrange the SA output to an event hub and read the data from there in real time or alternatively save the data into a NO-SQL db like DocumentDB on Azure and then read from there. I can recommend Highcharts if you want to use custom gauges etc to visualize the data.
Hope this helps.

Save Json to online database GAE or Firebase

I am new to JSON and online databases. I have learned the basics of using .js files and manipulation on them. But I have no clue how to save them onto GAE or Firebase databases.
1)My question is, are every online databases uses JSON differently when they store them?
I have no idea what it looks like storing onto an online database so
2)Can you give me an example of JSON stored in Firebase or GAE. Links to tutorials are also helpful.
Firebase is a true "online database" in a sense that you can save/retrieve/query data to it, without actually writing any code on the server. As such, it is close to Backend as a Service offerings, such as Parse, Kinvey, etc.. Search the web to find more services and compare features that you need.
OTOH, GAE is an application platform - you will need to write server-side code to create any functionality.
As for examples: please RTFM.
GAE's ndb datastore API has a JsonProperty:
https://cloud.google.com/appengine/docs/python/ndb/properties
It's easy to store a JSON object as a StringProperty, using json.loads, json.dumps to parse. For a simple list, you can use a StringProperty, and giving it the repeated=True tag:
https://cloud.google.com/appengine/docs/python/ndb/properties#repeated