Manage data block relationships
Blue supports joining two data blocks using either a 1-to-1 relationship, referred to as a "Links" type relationship, or linking together several data blocks in a many-to-1 relationship, known as a "Mapping Table" type relationship.
You can create multiple data blocks within a single datasource; however, each datasource can only have one primary data block. The different types of Data Blocks are:
- Primary – each Datasource can only have one Primary Data Block that is created when you establish the connection to an external data source and import data to Blue
- Extension – add additional data to your datasource, as either required or optional, usually from a different system of record or data file. Extension blocks are used when you need to add additional fields that come from a different source of data to your primary data block.
When updating an extension data block, the only data that will be imported is data that is related to existing records in the primary data block. Therefore, primary data blocks should always be updated before extension data blocks.
- Row - similar to an Extension Data Block, where you are adding additional data to your Datasource. Row Blocks are only used when you need to create additional rows (I.e. records) within your relationship datasource.
- Relationship – a Data Block that will join components of two or more other Data Blocks together. If you use a Relationship Data Block, you will tell Blue how to map the data together via the Relationships functionality.
Here are two examples of when you might need to have more than one data block for your project:
- At a higher education institution, if you are importing user data from more than one source, such as a Student Information System (SIS) and a Financial Aid System, you would create two Data Blocks within your singular User Datasource. Both of those Data Blocks will be included in the Datasource that you can then apply to your project Definition so Blue knows to pull User data from both of these Data Blocks.
- At an Enterprise organization, you might need to have a Datasource that includes a Data Block that is pulling User data from your own organizational HR system and another Data Block that uploads a CSV file containing your contractor User data. Once again, both sets of User data will be included in the overall User Datasource.
Navigate to Datasources - Data - Relationships to create a complex datasource relationship.
"Links" Type Relationship (1-1)
In this data setup scenario, two data blocks will be joined together following these conditions:
- Two or more data blocks have been created for a datasource.
- Each data block contains an ID field that can be matched to values in the other data block.
- The ID can only appear once in each data block.
Follow these instructions to set up a "Links" type relationship.
"Mapping Table" Type Relationship (Many-1)
In this example, two data blocks will be joined following these conditions:
- First, a primary data block must be created
- Second, at least one extension data block must be created
- Third, a relation data block must be created
- All three data blocks must contain unique identifiers
- The relation data block may contain null values in the foreign key column as Blue will merge the blocks mimicking a LEFT JOIN SQL command
Follow these instructions to set up a "Mapping Table" type relationship.
InFundamentals of Blue data