In Application Builder, data sources are key for showing data to users or getting info from them. They help get data and show it on the page.
Let’s talk about how to connect data to a Baserow application so you can use all its features.
With Baserow, you can add multiple data sources to your application, even on the same page.
You don’t have to connect a data source to your Baserow application, but it’s essential if you want more than a simple site with static content. This link lets you get and change data in real-time, making for interactive and fun user experiences.
When you tie a data source to your Baserow application, the data shows up on the page right away. Changes to the data show up instantly in your application, and you don’t have to republish anything.
Let’s explore how to connect a data source.
Navigate to the top navigation bar on the left-hand side of the page, where you’ll find options for Elements, Data, and Page settings.
To add a new data source, click on Data Source in the top navigation bar. A popup will appear, displaying a list of all currently connected data sources, along with an option to add a new one.
Click Add new data source.
Select a service type.
Select an integration from the dropdown menu or click Add new integration directly. Learn more about integrations and how to configure them.
As soon as you select a service type and integration, the element settings will become available.
Select a Database, Table, and View from the workspace. The items in the list can be sorted and filtered according to the sorting and filtering configuration of that particular view.
When you select the Get single row service type, you need to enter or map a row ID to retrieve a single row in a given table by its ID. Leave this value empty to return the first row in the table.
To dynamically input a row ID and retrieve a single row in a given table by its ID, add a page parameter to the page or add a user source.
Data source filters allow you to display Baserow table rows based on specific conditions you define. Before diving in, you must select a table to start using data source filters.
Learn more about filters in Baserow.
To show rows that apply to the conditions set:
The items in the list will be filtered according to the filtering configuration of that particular view.
You have the flexibility to filter rows by selecting multiple fields and applying various filters simultaneously using either And
or Or
conditions.
Understanding how filters interact between the Database and the Application Builder is important. It allows you to effectively manage filters between your database and the Application Builder, ensuring that your data is filtered precisely as needed.
Selecting a table without a specific view:
When selecting a table from the database without specifying a particular view in the data source filter configuration, any filters associated with views in the table won’t affect the results in the Application Builder. This means you can independently filter the rows displayed in the Application Builder, regardless of any view filters from the database.
This is useful when the views in the database table already have specific filters that you prefer not to use in the Application Builder.
Selecting a table and view to apply an additional filter:
When you select both a table and a view in the data source filter configuration, the filters you set are applied. Additionally, any filters present in the selected view within the database table will also be applied in the Application Builder. In this case, the filters at the table-level take priority, and then the filters at the Application Builder level only filter down the visible rows.
This is useful when you have specific filters in the view within the database table that are essential, but for further filtering in the Application Builder, additional filters are required.
You can enter plain text or use formulas for certain filters of your data sources. It can be used in conjunction with page parameters to define what to fetch from a data source and works with a Get row service type if you don’t specify the row ID.
To add a formula to filter data, use the “Sum” symbol next to the field value:
This option is available for the List multiple rows service type.
Sorting data sources in Baserow puts data in order based on specific criteria, like their names or numbers.
When you select a field to sort by, Baserow arranges the rows based on that field’s values. You can even choose multiple fields if you want to sort by more than one criteria, like first sorting by name and then by age.
Learn more about sorting data in Baserow.
Click Sorts → Add additional sort to select a field to sort rows by. This will reveal any sort applied.
Each field will have ascending and descending order options.
You can add more sorts by picking more fields to sort by. To apply a new sort, click the Add additional sort and then select another field from the dropdown menu.
If you apply sorts, regardless of whether you select a view, only the sorts defined within the data source configuration will be applied to your data. This ensures that the sorting criteria you specify within the Application Builder take precedence over any predefined sorts associated with the selected view.
When no sorts are applied:
If you do not apply any sorting configurations within the data source configuration, and you have selected a view for your data source, the sorting criteria defined within the selected view will be used. In this scenario, the sorting rules set within the view settings will control the table rows displayed.
This allows you to tailor your sorting preferences according to your specific requirements, whether using the sorting options within the data source configuration or relying on the predefined sorts associated with the selected view in the database.
Refreshing a data source triggers an update of the data for the selected element. It verifies if there have been any changes to the data in the source since it was last retrieved. This action is particularly useful after you’ve created or updated a row of data, ensuring you’re working with the most recent information.
Click Refresh fields from data source located within the General panel on the right side of the application interface to verify if any changes have been made to the underlying data source and incorporate those changes into your element.
To search the data source, specify a search term. You have the flexibility to choose the term for the search, giving you control over the query’s focus.
If no specific term is provided, the search will encompass all list items, offering a comprehensive view of the available data.
Deleting a data source permanently removes its associated information from the application.
To remove a data source from an application:
Still need help? If you’re looking for something else, please feel free to make recommendations or ask us questions—we’re ready to assist you.