Firestore Set Document function for Pipedream - google-cloud-firestore

I’m exploring using the Pipedream platform to push some data around. I would like to save data from an API payload to fire store using a set document function. Pipedream offers fire store integration but they do not have an out-of-the-box set document function. I need some help creating this custom function. Anyone out there that has experience with the Pipedream platform and Firestore?

Related

How to use Firestore as a client in Cloud Functions?

I'm working on a project that has a REST API deployed in Firebase Cloud Functions. This API manages all the Firestore reads and writes of the end users. Since the API is in Cloud Functions we use the Firebase Admin SDK which will bypass the security rules.
My goal is to run the queries using the API but as a user so that the reads and writes are checked by the security rules.
I found a solution which is using the Firestore REST API coupled with the firestore-parser library to get a JSON result similar to what i'm used to with the SDK. It was okay until i had to make queries with filters. To do so i need to use a structured query but the syntax is really complex and i will have to do a lot of mapping to parse a where clause from the JS writing.
So my questions are :
Is there a way to use directly the Firestore client SDK from the Cloud Functions?
If not, is there a simpler way to use the Firestore REST API?

how to push firestore data to algolia Swift

I've been doing research for the last several hours finding out how to do full text search in iOS apps with Firestore. I eventually realized full-text search is not supported. I read up on Algolia, watched tutorials, read articles and still don't see a way to push data from Firestore to Algolia in Swift. Can somebody guide me to a post or maybe add like a code snippet or something to show me how I can use this software? Thanks.
Algolia offers SWIFT API client
Swift API client is an open source, production-ready API wrapper that abstracts from the complexity of directly interfacing with the Algolia Search API
Basically to work with algolia using any API client, you have to do few things,
Install the algolia client
https://www.algolia.com/doc/api-client/getting-started/install/swift/?client=swift
Initialize the client with your application ID and KEY
https://www.algolia.com/doc/api-client/getting-started/instantiate-client-index/
Indexing your data & Setup searchable attributes
https://www.algolia.com/doc/api-client/methods/indexing/
https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/
Perform search
https://www.algolia.com/doc/api-reference/api-methods/search/
Many sub-actions available within these to improve your experience with Algolia. I recommend you to go through the docs fully.
Yes, there are few other ways available to work with algolia, like using cloud functions for indexing data into algolia and doing only search from your client. But as you specifically mentioned SWIFT the above references would help you to get started!

Is there a connectivity possible between google firebase and AWS MongoDB

I have data getting stored in Google firebase (i.e. output of google vision API). I need the same data to get stored in MongoDB which is running on AWS. Is there a connectivity possible between Google cloud and AWS for data migration?
There is no out of the box solution for what you're trying to accomplish. Currently Firestore supports exporting it's data as documented here though the format of the export is probably not something MongoDB could import right away. Even if the format was compatible you would need some kind of data processing pipeline to handle the flow from side to side.
Depending on how you're handling the ingestion of Vision API results you might be able to include code to also send that data to MongoDB. If that's not the case you might need to design a custom solution for this particular use case.

Using Mongo Stitch with Firebase Storage?

I'm currently developing a solution that lets users create a parent listing whereby they can upload files, assign child listings to that and then search their listings based on data from both the parent and child listings.
As an example, think of it as an inventory database. You create your parent listing for say a product, give it a name and upload some images of it. You then create your child listings which would be the stores that stock your product.
Your search capabilities would allow the user to search the product by free text, but also using parameters from the child listings, for example Price, In Stock, Tags etc.
I've tried to develop a concept using Firebase for this which utilises Auth, Storage and Functions, however due to the search limitations of Firestore, it cannot be done.
MongoDB offers something similar to Firebase' functionality whereby I can use Atlas which gives me all the search capabilities I need using Mongo instead of Firestore. In addition, they also have Stitch which provides the Cloud Function, Trigger and Auth functionality I need.
What they don't offer however is any Storage solution.
Does anyone know a way I can use MongoDB Stitch Auth, alongside Firebase Storage to integrate directly with the UI using the Firebase Storage security rules?
I know I could create a Stitch Function that handles the passing of file from UI to Firebase, however I'd prefer to go direct if possible.

Is the Firestore arrayUnion method available via its REST API?

Firebase Firestore recently added a new function for working with arrays called arrayUnion. This allows for inserting a value into an array. My question: Is this feature available through the rest api? If so how?
Apparently not, looking at the documentation. You could always file a feature request.