Data tab
This is the short-form core reference entry for the data tab where we cover the technical details of the interface. For a more in-depth article, see the link below:
Article: The data tab
The Data Tab manages the data that users create when using the app. It is where you configure and see the data within your app's database. It consists of a number of sub-tabs.
Data types
This section is where you define the data types that your app has - the kinds of things that you want to store data about in your database. The list of existing data types is listed on the left, along with a place to create a new data type.
When a data type is selected, its fields are shown on the right side, along with the ability to create a new field on that data type.
Note that the structure of an app's data types is visible in your app's . This includes:
data type names
field names
default values
Don't include any sensitive information in these fields. You can read more about how to maintain your app's security and privacy in the user manual article series below:
User manual article series: Security
Make this data type private
When creating a new data type, you have the option to make it private or public. If the data type is made private, it will be created with a privacy rule that allows only a thing's creator to view all fields, find the thing in searches and view attached files, with the "Everybody else" permission set to nothing allowed.
If instead the data type is created as public, things of the type will be visible by everyone.
User manual article: Protecting data with privacy rules
Privacy
This sub-tab is where you define rules around which users can see different kinds of data, or under which situations a user can see the data. Privacy rules are very important for the data privacy of your app! By default, new data types are generally visible to all end-users, so it's important to set privacy rules before you begin handling real end-user data.
User manual article: Protecting data with privacy rules
App data
This section shows you the data in your app's database. You view the data by data type, and you can create custom views of a data type to show a specific set of fields as columns, a filtered subset of data, sorted data, etc.
Note that the development and live versions of your app have separate databases, so you need to switch between them in the upper right in order to see the respective data. You can also create, modify or delete specific things (rows) in the database, or do bulk upload, export or modify actions.
User manual article: The data tab User manual article: Data
Run as
When looking at the user table, clicking the button 'Run as' runs the app as if you were that user, which makes debugging particular cases much easier.
Warning: Until you logout, you are using the app as this user, so do not make modifications.
User manual article section: Run your app as a specific user
New view
Clicking this button displays a popup that creates a new database view, which defines the fields that are seen on the right side of the screen. Constraints can be added to create a smaller list. By default, each type has a view that shows most fields with no constraints. The number of views is unlimited, and these views are shared between the Live and Development versions.
Duplicate views
Click the "Copy" icon next to the name of an existing database view to create another view just like it. You can then modify and add additional constraints to the duplicate.
Search
Enter something into the input box, and the things in the current view that contain the entered text are listed. Use this for a quick search of the app data.
New entry
Clicking this button displays a popup where you create a new database entry. Choose the type of thing and enter information into the predefined fields. This is equivalent to using a 'Create a new thing' action in a workflow.
Note: If you are uploading a file directly in App Data when creating or modifying an entry, there is a maximum file size of 50 MB. You can use the file uploader element instead to upload files up to 5 GB, although most browsers have an unofficial limit of 2 GB. Bigger uploads than this may be unreliable.
Upload
Clicking this button displays a popup where you upload a comma-separated CSV file of data. The type of data and relevant fields should be defined in the app before importing the file. This feature is available to users with a paid Bubble plan. Select the type of data and file to upload. Map the columns from the file to the fields of the data type and then validate and upload the data.
Important: The first row of your CSV file must be a header row containing the names of the fields for the data. Here's a sample file for reference.
Modify
You can bulk-modify data via a CSV upload. To do so, you should have a file with a column containing the unique ID of the things you want to modify, and enter the values that should be modified in subsequent columns.
Export
This button generates a CSV file with the data of the current view. The file is exported to the Download folder of your browser. This file can be edited. Because the app owner performs this operation, no privacy rules apply, and all fields chosen in the current view are exported. This feature is available to users with a paid Bubble plan.
Bulk Action
Clicking this button displays a popup that runs an API workflow on the entries in the current view. This is useful when you want to modify a list of things in the database. Select the API workflow you want to run. The workflow takes only a thing as a parameter.
Warning: This operation permanently modifies the data. If processing many entries, this may take some time.
Switch to Live/Switch to Dev.
Clicking this displays the Version dropdown menu to switch between the Development and Live versions of the app. Remember that each version has a separate database.
Copy and restore database
Clicking this button opens a popup to overwrite the Live version of the data with the Development version, and vice and versa. Use this to test the app with real data or migrate the Development version data to the Live mode. For users with a paid Bubble plan, the application database can be restored to an earlier point in time. The restore functionality is designed to recover from mistakes that corrupt or delete big chunks of data. It restores the complete state of the database, including all the users' account information, a list of images, scheduled workflow runs, etc.
Warning: Any data created after the restored version will be deleted. This option should be used only in catastrophic situations where it is better to revert to a previous database than to work with the current database. Restore operations are reversible. Simply perform another restore to the point in time right before the first restore.
Wiping the database change history
You can delete the database change history of each individual database (Development/Live) by using the wipe database change history feature in the Copy and restore database popup.
Erasing the change history is irreversible and permanently deletes the database backups. Exercise caution when using this feature. Unless you fully understand the consequences and have a clear reason to use it, we advice you to not go through with it.
You can read more about what this does, and its advantages and drawbacks in the user manual article below:
Article: Wiping the database change history
User manual article: Restoring backups
Primary fields
Clicking this button opens a popup where you define the primary field for each of the data types. This determines the way the data is displayed and how the CSV files are generated. For example, a user may be represented by his email, an apartment, an address, etc. This is for display purposes only.
Refresh data
Refresh to view recent changes to your data, especially as the result of a backend workflow or database trigger event.
Load 50 more items
Click here to display an additional 50 rows in this database view.
Upload data as a CSV
This popup uploads existing data from a CSV file. CSV is a standard way to represent rows and columns of data in a text format. Microsoft Excel, for example, generates these files. This feature is available to users with a paid Bubble plan.
Note: This feature is now in public Beta and some limitations may exist.
For example, there is a minor inconsistency in formatting between how Bubble exports a list"x , y , z"
and the list format it requires on import"[x , y , z]"
.
Type of data
Select which type of data to upload. The type of data and relevant fields should be defined in the app before importing the file.
Data delimiter
Commas are typically used to delimit entries, but different delimiters are possible. Tab or pipe delimiters are useful when working with text that includes commas. Choose the delimiter in the application creating the CSV file.
Pick a file to upload
Select a CSV file to upload.
Map fields
This very important step is where you map the columns of data to the fields in the application database.
Custom field
Select a data type field in the dropdown menu for each column of data. These fields should be defined in the data type before the upload.
Composite field
If the field you're matching the column with is a custom type, then specify which field of the subtype should be used to match the text entry. For example, let's say you're uploading a list of apartments, and one of the fields is an owner. If the owner is represented by a last name in the CSV file, choose 'Last name' as the composite field. The entries should exist in the database before you upload the file. If two entries in the Bubble application database match the same value, an error will be returned.
List delimiter
This is the delimiter to use when a field is a list of things. It should be different from the main delimiter. For example, if ';' is used as the delimiter, the data should be in this form: 12;54;32;67.
Note: When importing data for type list, optionally enclose the list in '[' and ']', and then separate the individual items with the delimiter. For example, "[kitchen; bedroom; bathroom]", or "kitchen; bedroom; bathroom".
Overwrite data when the field value is empty
When unchecked, empty entries in your CSV for a field will be ignored. When checked, instead they will explicitly overwrite the existing value with an empty value. In both cases, unmapped fields are ignored and will not be overwritten.
Validate data
Clicking this button does a quick analysis of the data to be uploaded, to make sure the first couple of rows are valid.
Upload data
Clicking this button uploads the data. First, it uploads the file to our servers. Then, it processes the upload in the background using your server capacity. While this happens, you are free to close the webpage and come back. An email will be sent on completion, or if there is an error while uploading.
Note: Only one upload or modify can occur at a time for a given application.
Option sets
Option sets are lists of a given set of options that are defined by you for use throughout your app. Examples would include things like a pre-defined list of statuses that tasks can go through, a list of all countries in the world, types of user privilege levels, etc. Unlike data, the options in an option set cannot be added to, deleted or modified by an end-user - they are defined as part of the app. This sub-tab is where you manage your option sets: which sets exist, the specific options in a set, and any additional attributes you've created on a set.
User manual article: Option sets
File manager
The File Manager section in the Data Tab shows the files or images that you or your users have uploaded in either the development or live version of your application. These are stored separately from the defined data types or option sets, and you can manage them here.
Note: Apps on free plans do not have the ability to upload .html
file types. If you need to upload an .html file
type for your app's use case, consider upgrading to a Paid plan.
File name
The name of this file when it was uploaded to your application. Enter a name to search for a specific file.
Only private files
If this box is checked, only files attached to a data type, and therefore controlled by that type's privacy rules, will appear in your list of files.
File type
Limit the displayed files based on type, for example, show only jpegs, pngs, or PDFs.
Sort by
Choose whether to sort by file size or created date, and check the "Descending" box to largest to smallest files, or most to least recent.
Search
Click this button to apply your search constraints for file name, private files, file type, and sort by field.
Size
The size of the uploaded file in bytes.
Type
The format of the uploaded file, such as csv, css, jpeg, png, pdf, or ttf.
Uploaded date
The time at which the file was uploaded.
User ID
The unique ID of the user who uploaded the file.
Attached to
For private files, the unique ID of the thing this file is attached to.
View
Click this link to preview the uploaded file. When you click this from the File Manager, you have admin access and will also be able to view private files.
Other ways to learn
Last updated