BuildShip Tables
BuildShip Tables give you an easy visual way to manage your BuildShip Database. Every BuildShip project comes with a ready-to-use Firestore database.
With BuildShip, you get the ultimate flexibility to choose the database that best works for your project.
- Use BuildShip Database: If you are looking for quick and ready-to-use database with an instant database management UI.
- Pick Your Own Database: Firestore, Postgres, Supabase, MySQL….or any database. Choose a database that works for you if you do not want to use the BuildShip database. In this case, you can simply use them in the workflows and APIs using CRUD nodes.
How to use BuildShip Table
If you're using the BuildShip database, by using the BuildShip Database nodes in your workflows, you can access BuildShip Tables to visualize and manage the data populated by these nodes.
You can use BuildShip database in your workflows using the BuildShip Database CRUD nodes, and access the data in a tabular format visually using the BuildShip Tables. (This feature is now available for users on all plans! ⭐️)
Access BuildShip Table
You can access BuildShip Tables directly from the CRUD node you are using. Once you click on the table icon available on the BuildShip Database node, you'll be prompted to create a new table or select an existing table.
Alternatively, you can access BuildShip Tables from the side navigation bar. Click on the Database icon to access the BuildShip Tables.
Creating Tables
There are two ways of creating a BuildShip Table:
Set up an existing collection
After navigating to the Databases tab, users will be able to check out the existing collections as tables, if any. If you do not have any existing tables, proceed to the Creating a new table section.
- To initialize an existing collection as a BuildShip table, simply click on the Setup ➤ button.
-
Select the table type, or leave it as default. Under the Display section, users can edit the Table Name and ID. Optionally create and select display sections, add description for easy access.
-
Under the Columns section, select the columns to initialize with the table. Click on Create.
-
Now a table will be initialized for the collection name provided. Click on "Import Existing Data" to import the data into your table.
-
Follow the step-by-step guided process to import your data and hit "Finish".
Creating a new table
-
Once you've navigated to the "Databases" tab, click on the "Create Table" button. (or look for the ✚ icon on the bottom right corner to add a new table)
-
Select a Collection Name. You can also copy and paste the name of the collection used in your BuildShip Database Nodes to import the existing data in your table.
-
Optionally, you can add the display information for your table and select initial "Row ID" as the column. Users also have the option to quickly copy existing column data from any existing tables.
-
Click on "Create" to create the table.
Manipulating Table Data
There are two ways to manipulate the Firebase Collection data associated with your table.
Via BuildShip Table UI
- In your empty table, click on "Add Column" button. Add in the Field Name, Field Key, and the Field Type.
If you already have existing fields in your collection, make sure to match the Field Key value with your existing keys to sync data.
- Click on "Add Row" button to add values to your table.
Via BuildShip Database Nodes
BuildShip has pre-built CRUD nodes available under the BuildShip Database Integrations section in the Node Library. These nodes are similar to the Firestore database nodes and are meant to help you insert, query, and manipulate your BuildShip Data.
In the next section, we'll see how we can perform some basic operations on our data.
BuildShip Database Nodes
Let's see how we can perform some basic operations and visualize them in our BuildShip Tables interface:
Document Reference
The Document Reference node is used to get a reference to a document in a collection. This is useful when you want to reference a document in another collection or use it in a filter.
The output of this node will be a Firestore Document Reference Object:
Inputs:
- Collection Name: The name of the collection to get the reference from.
- Document ID: The ID of the document to get the reference from.
Create Document
To create or update a document in a collection, we need to add the Create Document node from the BuildShip Database integration.
To test it out, let's try to add a new document in a fake users collection connected to a BuildShip table. Add in the data as shown in the image below.
And we can see the document added to the table:
Inputs:
- Collection Name: The name of the collection to create the document in.
- Data: The data to create the document with.
- Document ID (Optional): The ID of the document to create. If not specified, a random ID will be generated. If specified, the document will be updated if it already exists, or created if it doesn't.
- Merge: If set to true, the data will be merged with the existing document. If set to false, the existing document will be overwritten.
Collection Query
To query a collection, we can use the Collection Query node from the BuildShip Database integration.
Add the collection name in the "Collection Name" field. This should match the name of a collection you have already linked to a BuildShip Table. For example, if you created a table called "users", enter "users" as the collection name.
Inputs:
- Collection Name: The name of the collection to query.
- Filters: The filters to apply to the query. See Filtering Data for more information.
- Limit: The maximum number of documents to return.
- Order By: The field to order the results by. See Ordering Data for more information.
- Filter Logic: The logic to apply to the filters. See Filter Logic for more information.
Filtering Data
Filtering data is made easy with a pre-built list of common comparison operators and the option to combine multiple filters.
For example, to filter the documents where the age is greater than 18, we can use the following filter:
Or to filter document where the age is greater than 18 AND less than 30, we can combine the following filters:
Filter Logic
The Filter Logic field is used to specify the logic to be applied to the filters. It can be either OR or AND. By default, it is set to AND which means that all the filters must be true for the document to be returned.
Switching to OR will return all the documents where at least one of the filters is true.
For example, to filter the documents where the age is greater than 18 OR less than 30, we can set the Filter Logic to OR and mantain the previous filters:
Filter by Reference
To filter by reference we can utilize the Document Reference node to return a reference to document in another collection. We can then use the returned reference to filter the documents in the collection.
This will return all the documents where the field "parentRef" is equal to the reference returned by the Document Reference node.
Ordering Data
To order data in a collection, use the Order By field in the Collection Query node. The process is straightforward - enter a field name and select either Ascending or Descending order direction. The node also supports ordering by multiple fields simultaneously for more complex sorting requirements.
Get Document
To get a document from a collection, lets use the Get Document node from the BuildShip Database integration.
Add in the Collection Name and the Document ID to retrieve.
Inputs:
- Collection Name: The name of the collection to get the document from.
- Document ID: The ID of the document to get.
Update Field Value
To update a field in the document from a collection, lets use the Update Field Value node from the BuildShip Database integration.
For this, we need the Document Path instead of the Collection Name and Document ID. To get the Document Path, let's go to our BuildShip Table for the document we wish to update. Right click any value for that particular row and click on "Copy Path".
Paste the copied document path in the Document Path input field. The Document Path is in the following format:
collectionName/DocumentID
.
Add in the Field Key to update and the New Value to update. In this case, we are updating the "name" field to "Sam Tester Update".
Inputs:
- Document Path: The path of the document to update.
- Field Key: The key of the field to update.
- New Value: The new value to update the field with.
Delete Document
To delete a document from a collection, lets use the Delete Document node from the BuildShip Database integration.
Add in the Collection Name and the Document ID of the document to delete.
Inputs:
- Collection Name: The name of the collection to delete the document from.
- Document ID: The ID of the document to delete.
Add Object to Array
To add an object to an array in a document, lets use the Add Object to Array node from the BuildShip Database integration.
Enter the Field Key which should be an array field in your document that you want to add the object to, and the Object that you want to append to that array.
Inputs:
- Collection Name: The name of the collection to add the object to.
- Document ID: The ID of the document to add the object to.
- Field Key: The key of the field to add the object to.
- Object: The object to add to the array.
Document Count
To get the number of documents in a collection, lets use the Document Count node from the BuildShip Database integration.
Add in the Collection Name to get the count of documents in that collection.
Inputs:
- Collection Name: The name of the collection to get the count of documents from.
- Filters: The filters to apply to the query. See Filtering Data for more information.
- Filter Logic: The logic to apply to the filters. See Filter Logic for more information.
Get Field Value
To get the value of a field in a document, lets use the Get Field Value node from the BuildShip Database integration.
Inputs:
- Collection Name: The name of the collection to get the field value from.
- Document ID: The ID of the document to get the field value from.
- Field Key: The key of the field to get the value from.
Field Sum
To get the sum of a field in a collection, lets use the Field Sum node from the BuildShip Database integration.
Add in the Collection Name and Field Name to get the sum of the field.
Inputs:
- Collection Name: The name of the collection to get the sum of the field from.
- Field Name: The name of the field to get the sum of.
- Filters: The filters to apply to the query. See Filtering Data for more information.
- Filter Logic: The logic to apply to the filters. See Filter Logic for more information.
Field Average
To get the average of a field in a collection, lets use the Field Average node from the BuildShip Database integration.
Add in the Collection Name and Field Name to get the average of the field.
Inputs:
- Collection Name: The name of the collection to get the average of the field from.
- Field Name: The name of the field to get the average of.
- Filters: The filters to apply to the query. See Filtering Data for more information.
- Filter Logic: The logic to apply to the filters. See Filter Logic for more information.
Delete Document Fields
To clear field values from a document, lets use the Delete Document Fields node from the BuildShip Database integration. This node removes the values from specified fields while keeping the fields themselves in the document structure.
Add in the Document Path (collectionName/DocumentID) and Fields to clear the values from the specified fields.
Inputs:
- Document Path: The path of the document containing the fields to clear (collectionName/DocumentID).
- Fields: The names of the fields whose values should be cleared/removed from the document.
Vector Embedding Value
Use the Vector Embedding Value node to create a Firestore vector field value for storing embeddings, which can be used for vector similarity search in Firestore.
See Vector Embedding (opens in a new tab) for more information.
Inputs:
- Embedding Vector: An array of numbers representing the embedding vector. You can use the Generate Embeddings node from the OpenAI integration to generate embeddings from text.
Vector Query
To query a collection using vector similarity search, use the Vector Query node from the BuildShip Database integration.
Inputs:
- Collection Name: The name of the collection to query.
- Vector Field: The name of the vector field to use for the query.
- Embedding Vector: The embedding vector to use for the query.
- Limit: The maximum number of documents to return.
- Distance Measure: The distance measure to use for the query. Options are Cosine, Euclidean, and Dot Product.
- Distance Threshold: The distance threshold to use for the query. This is the maximum distance between the embedding vector and the vector field in the collection.
Need Help?
- 💬Join BuildShip Community
An active and large community of no-code / low-code builders. Ask questions, share feedback, showcase your project and connect with other BuildShip enthusiasts.
- 🙋Hire a BuildShip Expert
Need personalized help to build your product fast? Browse and hire from a range of independent freelancers, agencies and builders - all well versed with BuildShip.
- 🛟Send a Support Request
Got a specific question on your workflows / project or want to report a bug? Send a us a request using the "Support" button directly from your BuildShip Dashboard.
- ⭐️Feature Request
Something missing in BuildShip for you? Share on the #FeatureRequest channel on Discord. Also browse and cast your votes on other feature requests.