What are Sheets?
Sheets are individual data tables within Workbooks that organize and structure imported data. Each Sheet represents a distinct data type or entity, similar to tables in a database or tabs in a spreadsheet. Sheets serve as containers for Records and are defined by Blueprints that specify their structure, validation rules, and data types. They provide the fundamental building blocks for organizing data within the Flatfile platform.Basic Blueprint Structure
- A Blueprint defines the data structure for any number of Spaces
- A Space may contain many Workbooks and many Documents
- A Document contains static documentation and may contain many Document-level Actions
- A Workbook may contain many Sheets and many Workbook-level Actions
- A Sheet may contain many Fields and many Sheet-level Actions
- A Field defines a single column of data, and may contain many Field-level Actions
Basic Sheet Definition
The following examples demonstrate the configuration of isolated Sheets, which are intended to be used in the context of a Workbook configuration.Single-Sheet Sheet Configuration
This example configures a single Sheet containing three Fields and one Action and defining access controls.Sheet level access
Withaccess you can control Sheet-level access for users.
Sheet Constraints
Sheet constraints apply validation rules across multiple fields or entire sheets. These constraints ensure data integrity at the sheet level and work in conjunction with field-level constraints.Composite Uniqueness
Ensures that combinations of multiple field values are unique across all records in the sheet. This is useful when individual fields can have duplicate values, but their combination should be unique.Configuration Properties
Strategy Options:
Config Options:
Choosing the Right Strategy
Thestrategy property determines how uniqueness is calculated. You can choose to simply concatenate the field values as a single string or use a SHA1 hash function to create a unique identifier. Consider the following when choosing a strategy:
Use concat when:
- You aren’t concerned about concatenation collisions (see example below)
- Performance is critical (string concatenation is faster than SHA1)
- You have short/consistent value sizes
hash when:
- You want to avoid concatenation collisions
- You aren’t concerned about the performance cost (SHA1 calculation is slower than string concatenation)
- You have long/inconsistent value sizes (SHA1 hashes are always 20 bytes)
concat strategy would consider the following records to be duplicates:
concat strategy:
hash strategy would prevent this, because the hash function creates a unique identifier based on each field’s invividual value rather than a simple concatenation.
hash strategy:
Conditional Validation with Required Fields
TherequiredFields property enables conditional uniqueness validation. When any field specified in requiredFields is empty (null, undefined, or empty string), the entire constraint is ignored for that record.
Use Cases:
- Partial data imports - Allow incomplete records during staged import processes
- Optional relationships - Handle cases where some composite key fields are optional
- Data migration - Gradually enforce constraints as required fields get populated
- Conditional business rules - Only enforce uniqueness when critical fields have values
requiredFieldsshould contain only fields that exist in thefieldsarray- If ANY required field is empty, the constraint is completely ignored
- Empty fields are:
null,undefined, or empty strings ("") - If
requiredFieldsis omitted, the constraint always applies
Example: Customer Registration System
Consider a customer registration system where you want unique combinations of email and company, but only whenemail is provided:
Without
requiredFields:
All records would be validated, potentially causing errors during partial data imports.
Example: Multiple Required Fields
For more complex scenarios, you can specify multiple required fields:orderId and productId have non-empty values. If either is empty, the entire constraint is ignored.
Individual field constraints like required and unique are covered in Field Constraints.
Collections
Collections provide a way to organize Sheets within a Workbook into named groupings in the Flatfile UI. This helps to visually organize complex Workbooks with many Sheets, making it easier to navigate and understand the data structure. Collections have no functional impact on the data itself; their only purpose is to help you organize your Sheets visually.Configuring Sheets with Collections
Assigning a Collection to a Sheet is as simple as adding acollection property to your Sheet Blueprint when configuring your Space (or otherwise creating or updating a Sheet via the API). If you add the same Collection to multiple Sheets, they will be grouped together in the UI.
The following example depicts a Blueprint defining a single Workbook with three Sheets organized into two Collections: Source Data with one Sheet, and Processed with two Sheets.
Workbooks also have a similar feature called Folders, which you can use to group associated Workbooks.You can think of Folders and Collections like a filing system:
- Folders help you organize your Workbooks within a Space (like organizing binders on a shelf)
- Collections help you organize Sheets within each Workbook (like organizing tabs within a binder).
- Screenshot
- Blueprints

An example of Sheets grouped by Collection
Sheet Treatments
Sheets have an optionaltreatments parameter which takes an array of treatments for your Sheet. Treatments can be used to categorize your Sheet and control its behavior. Certain treatments will cause your Sheet to look or behave differently.
Reference sheets
Giving your Sheet a treatment of"ENUM_REFERENCE" will mark it as reference data for other sheets. Reference sheets are currently hidden from view, allowing you to generate a number of reference values without adding visual distraction for the user.
Dynamic EnumsThis feature, along with the Reference Field Filtering feature, may be collectively referred to as Dynamic Enums. By combining these two features, you can create a drop-down list for any cell in your sheet that’s dynamically controlled by the value of another field in the same record – and to the end-user, it will just work like a dynamically-configured
enum field."ENUM_REFERENCE" is the only treatment that changes the behavior of your Sheet.

