Unity Catalog Architecture Patterns
Patterns include Software Development Life Cycle setup, Cross cloud region data access, BI for multiple Business Units in a single cloud-region, BI for multiple Business Units in multiple cloud-regions, Phased Migration to UC, and ML Setup.
Software Development Life Cycle Setup
- Customers use different environments for the different stages of development.
- The minimal setup is to have two environments for Development & Test and Production.
- Most customers also split Development & Test into two or more environments, with development and quality assurance environments being called Test, QA, Staging, or Integration.
- The recommended setup is DEV, STG, and PRD, but the approach scales for more or fewer environments.
- Enterprise customers isolate these environments from a storage and compute perspective using different storage containers, virtual networks or VPCs, and Workspaces.
- Delegation of Management allows each SDLC environment to have its own admin.
- Workspace to catalog binding ensures the PRD workspace is fully isolated and has its own catalog.
- The DEV workspace has access to both the DEV and STG catalogs.
- Storage isolation separates the storage locations on the catalog level, which is typically sufficient.
- Access Control ensures users should only gain access to data or metadata based on agreed access rules.
- There will only be one Metastore per cloud region, which will be used for all related SDLC workspaces.
- The environments are isolated on the Catalog level of the three-level namespace.
- DEV, STG, and PRD workspaces are assigned to their respective catalog only.
- Data locations are isolated by assigning dedicated managed buckets or containers to the catalogs.
- Admin scope is isolated by delegating administration of the catalogs to different admins for DEV, STG, and PRD.
- Catalog names can be combinations of SDLC and business or organizational unit names, for example, sales_dev, sales_prd, engineering_dev.
- Access to workspaces, clusters, and endpoints needs to be configured accordingly.
- As a best practice, use at minimum two workspaces for others and prod, but ideally three workspaces for dev, stg, and prod.
- System accounts include a DEV System Account, a System Account to execute jobs in PRD, a PRD System Account, and a User Group working in DEV and Prod.
- Full access to tables on DEV data is granted to the user group, while full access to tables on PRD data is granted to the job execution account.
- Optionally, read-only access to tables on PRD data can be granted to the user group.
Cross Cloud Region Data Access
- A provider can provide data via Delta Sharing.
- Region 2 will share tables with the metastore of region 1.
- Region 1 will create catalogs in its metastore to hold the tables from the share of region 2.
- Users in region 1 can then discover and access the shared data from region 2 via their local metastore.
- A provider can provide compute via Lakehouse Federation.
- Region 1 will connect to the workspace in region 2 represented in its metastore by a Foreign Catalog.
- Users in region 1 can then access the shared data from region 2.
- In both cases, region 1 can additionally control access for their users on top in their metastore.
- Egress costs arise from data leaving region 2 due to region 1 reading.
- Registering common tables as External Tables in more than one metastore is strongly not recommended.
- Data flows between clusters or SQL warehouses, and access control is managed centrally or by the Workspace.
- A provider can provide compute via JDBC, ODBC, or SQL Connector for Python.
- Users in region 1 will connect to specific compute resources such as clusters or SQL Warehouses in region 2.
- Queries will be executed on the compute resource in the second Workspace.
- There is no integration into the metastore of region 1.
- Egress costs arise from data leaving region 2 when region 1 is reading or data leaving region 1 when region 1 is writing.
- Managed replication is relevant in cases when egress costs get too high.
- Data is replicated in intervals from the provider to the recipient, driven by the recipient in region 1.
- The approach involves replicating and querying locally.
- Replication types include managed full replication, which is only reasonable for small data, and managed incremental replication, which requires checking the used technology whether incremental replication is supported.
- Impact involves data freshness depending on refresh interval time and business impact, as well as higher maintenance effort for managing the replication pipeline.
- Egress cost impact includes full egress cost each time it will be replicated for full replication, and a one-time cost for the whole data set for incremental replication.
Business Intelligence Core Processes
- Data Production involves the creation of data via Ingest and ETL processes or by different business-oriented teams, considering what is a meaningful data set.
- Data Governance involves metadata management and access control.
- Data Publishing is a deliberate step to provide access to a data set for other consumers, considering where to publish which data set and whom to provide which access at which point in time.
- Data Consumption uses own data or published data by others for analysis, reporting, and ML to generate value from data.
- Platform Operations means data teams will work on one or more platforms.
- Depending on the enterprise, data teams can operate their own platform, or there is a central team that comes up with a blueprint for the setup.
Publishing Types
- Distributed Publishing involves Business Units sharing the data they created themselves.
- Each Business Unit is responsible for data quality, treating published data as a data product, and access permissions.
- Business Units are not isolated from an infrastructure perspective, such as having no network restrictions.
- Usually, there is still a central team to provide platform operations, responsible for defining secure and compliant blueprints and setting up infrastructure.
- This team also provides capabilities to ensure private data can be protected, for example by managing access from a network perspective, but it does not play a role in publishing and configuring data access.
- The Central Business Unit can also publish common data to other Business Units.
- Centralized Publishing involves a central Business Unit serving as a Hub.
- Business Units are isolated from each other, for example by network access restrictions.
- The central Business Unit provides central data storage and the central metastore to publish data, metadata, and ACLs for all Business Units.
- It usually provides central data governance, applying quality assurance on all published data, and platform operations for secure and compliant blueprints and infrastructure setups.
- Often the central Business Unit publishes its own data via a central data engineering team.
- Strictly governed pull approach: The Business Unit notifies the Central Business Unit that a table should be published.
- The Central Business Unit validates data quality and compliance of metadata to the defined rules, copies data from the Business Unit container to the corresponding folder in the central container, and creates a schema in the central catalog.
- The Central Business Unit sets up a job to regularly update the centrally published data, either batch or streaming.
- This pattern also applies to scenarios where Business Units are not skilled enough to properly publish data, meaning the central team provides a publishing service instead of primarily applying governance.
- Loosely governed push approach: The Business Unit copies data to its folder in the central container, where each unit only has access to its specific folder.
- The Business Unit creates a schema in its central catalog for published data, where each unit only has access to its catalog.
- The Business Unit sets up a job to regularly update the central data, either batch or streaming.
- The central team mainly provides publishing infrastructure and applies lightweight data governance, such as monitoring data quality and validating data is kept up to date.
- The Business Unit defines ACLs on the new table.
Business Intelligence for Multiple Business Units in a Single Cloud-Region
- Organization and roles involve a Central Business Unit that provides blueprints for platform setups, central platform management, and data centrally, including global and possibly unit-specific data.
- Business Unit 1 works with local data combined with central data and can provide created data sets to other units by publishing data.
- The cloud setup places all Business Units in one cloud-region.
- The use case is focused on Reporting and Analysis via BI Tools.
- The Central Business Unit maintains central data pipelines and provides access to central data for each unit.
- Other Business Units use their own cloud storage for their data and mainly use BI tools and SQL to work with their own data alongside centrally provided data.
- They can share data on a central cloud storage or their own storage, always centrally governed.
- Since this setup is in one cloud region, there is a single metastore covering all Business Units, including the Central one.
- Consider workspace binding, storage, and admin isolation features when setting up the central and other Business Units.
- In data production, central ingest and ETL are executed by the central Business Unit, while other units create specific business data sets.
- In data publishing, the central Business Unit publishes data to the central production storage and into its own catalog.
- Other Business Units publish to their production storage and into their respective catalogs.
- In data governance, which is distributed, the central team and each Business Unit can work independently on their catalogs for publishing and setting ACLs.
- In data consumption, published data will be discovered in the metastore and consumed from production storage of the respective units, whether central or other.
- For platform operations, the central team provides platform blueprints and creates environments for the units in an automated way.
- In the distributed publishing process, ACLs are set at the schema and table level.
- The central production catalog maps to a schema and table, which corresponds to the central production bucket and dataset folders.
- Similarly, the production catalogs for Business Unit 1 and Business Unit 2 map to their respective schemas, tables, and production buckets.
- Permissions on the catalog level specify that the Central owner has use catalog and create schema permissions on the Central development, staging, and production catalogs.
- Other Business Units have no access to the Central development and staging catalogs, but can be given use catalog access to the Central production catalog.
- Business Unit 1 owns its development, staging, and production catalogs, holding use catalog and create schema permissions, while the Central team can be given use catalog access to the production catalog of Business Unit 1.
- Business Unit 2 has identical permissions for its own catalogs, and the Central team can similarly be given access to the production catalog of Business Unit 2.
- To access tables, use schema and select permissions also need to be provided on the schema and table level.
- In centralized data governance, the central team and each Business Unit can work independently on their catalogs for non-published data.
- The central team applies additional quality assurance and maintains ACLs in the central Business Unit catalog.
- In data consumption, published data will be discovered in the central catalog and consumed from the central production storage.
- For platform operations, the central team provides platform blueprints, creates environments for Business Units automatically, and could provide common data services.
- Published datasets and tables configure access permissions, data is consumed from other units, own databases and tables are created and consumed, and environments are isolated by network access restrictions.
- The centralized publishing process involves the Metastore linking to published and production catalogs for the various Business Units.
- The process includes publishing data, publishing metadata, and setting ACLs.
- Central data governance controls data quality and compliance with publishing rules like naming conventions, and controls data access by setting ACLs.
- The location maps central and Business Unit buckets or containers to their respective dataset folders.
- Permissions on the catalog level specify that the Central owner has use catalog and create schema permissions on the Central development, staging, and production catalogs, as well as published catalogs for Business Unit 1 and Business Unit 2.
- Other Business Units have no access to the Central development and staging catalogs, but can be given use catalog access to the Central production and published catalogs.
- Business Unit 1 owns its development, staging, and production catalogs, holding use catalog and create schema permissions, while the Central team can be given use catalog access to its production catalog.
- Business Unit 2 has identical permissions for its own catalogs.
- To access tables, use schema and select permissions also need to be provided on the schema and table level.
- Specific catalogs exist where other Business Units can be given access to schemas and tables or views by the Central team.
- Centralized Publishing does not mean that all production data from a participating Business Unit will be copied over to the central storage location.
- In the centralized publishing model, Business Units will still maintain their own development, staging, and production environments.
- Business Units initially create production tables for internal consumption.
- Some of these tables might be relevant for other units, hence worth publishing as a full copy of the original or as a partial copy with filtered columns or rows, or via masking.
- Push or pull publishing should be chosen according to customer requirements.
- Comparisons of central containers and buckets against Business Unit containers and buckets illustrate full copies, partial copies, published tables, and unpublished tables.
- System account mappings involve different System Accounts for cloud storage level audit if needed.
- Data access patterns include read and write access mapping specific development, staging, and production system accounts to their corresponding project paths.
- It also includes read or write or read-only access mapping development, staging, and production system accounts to shared paths.
- Paths like datasets, projects, and shared spaces within development, staging, and production storage endpoints integrate seamlessly with User Management.
Business Intelligence for Multiple Business Units in Multiple Cloud-Regions
- Organization and roles involve a Central Business Unit that provides blueprints for platform setups, central platform management, and data centrally, including global and unit-specific data.
- Business Unit 1 works with local data combined with central data and can provide created data sets to other units by publishing data.
- The cloud setup places Business Units in multiple cloud-regions.
- The use case is focused on Reporting and Analysis via BI Tools.
- The Central Business Unit maintains central data pipelines and provides access to central data for each unit.
- Other Business Units use their own cloud storage for their data and mainly use BI tools and SQL to work with their own data alongside centrally provided data.
- They can share data on a central cloud storage or their own storage, always centrally governed.
- Since this setup is in multiple cloud regions, there is one metastore per region.
- Workspace binding, storage, and admin isolation features must be considered when setting up the central and other Business Units.
- Cloud region 1 with the Central Business Unit and Metastore 1 links via to Cloud region 2 with other Business Units and Metastore 2.
- In data production, central ingest and ETL are executed by the central Business Unit, while other units create specific business data sets.
- In data publishing, the central team publishes data to central production storage and into the first Metastore.
- Business Units publish to their production storage and into their Metastore, such as the second Metastore.
- For Delta Sharing, the second Metastore will be a recipient of the first Metastore to share central metadata with the second region.
- If Business Units exist in separate cloud regions and want to share data, Delta Sharing needs to be set up for their Metastores.
- In data governance, which is distributed, all Business Units set ACLs for their own and delta-shared data.
- In data consumption, published data will be discovered in the Business Units Metastore and consumed from their production storage.
- For platform operations, the central team provides platform blueprints and creates environments for the units automatically.
- Additional mechanisms include Delta Sharing, Lakehouse Federation, and JDBC or ODBC.
- The distributed publishing process across multiple metastores involves setting ACLs and sharing with the second metastore.
- The central production catalog maps to a schema and table in the central bucket.
- To publish and share central data, the central metadata is shared with the second Metastore via Delta Sharing or Lakehouse Federation, and ACLs for the initial and shared data need to be aligned.
- Business Units publish and share their data with other units by setting ACLs on their respective schemas and tables located in their production containers.
- Permissions on the catalog level specify that the Central owner has use catalog and create schema permissions on the Central development and staging catalogs.
- Other Business Units have no access to these.
- The Central owner also has use catalog and create schema permissions on the Central production catalog, where Business Unit 1 and Business Unit 2 can be granted use catalog permissions for region 1 specific ACLs.
- The Central owner has use catalog and create schema permissions on the Central published catalog holding shared databases and tables, where Business Unit 1 and Business Unit 2 can be granted use catalog permissions for region 2 specific ACLs.
- Business Unit 1 owns its production catalog and other catalogs, with use catalog and create schema permissions, while the Central team has no access unless Delta Sharing or Lakehouse Federation is set up.
- Business Unit 2 owns its production catalog and other catalogs with identical permissions.
- To access tables, use schema and select permissions also need to be provided on the schema and table level.
- In data production, central ingest and ETL are handled by the central Business Unit, while other units create business data sets.
- In data publishing, the central team publishes data in central production storage and into the catalog of the Central Business Unit in the first Metastore.
- Business Units publish by requesting the central team to move data from their production storage to central production storage and into the Business Unit catalog in the first Metastore.
- The central Business Unit configures access control on delta-shared data in the second Metastore.
- This second Metastore acts as a recipient of the first, ensuring all published metadata is shared across.
- In data governance, access permissions are defined centrally, and the central team maintains access control for all published data with input from the Business Units.
- The central team might also apply additional quality control.
- In data consumption, published data is discovered in the second Metastore by the Business Units and consumed from the central production storage.
- For platform operations, the central team automatically provides platform blueprints and creates environments for Business Units.
- Data is isolated by network access restrictions.
- The centralized publishing process across multiple metastores involves publishing data and publishing metadata.
- Access control lists are set on the central production schema and table, as well as the published schemas and tables for Business Unit 1 and Business Unit 2.
- The metadata is then shared with the second Metastore using Delta Sharing or Lakehouse Federation.
- Access control lists are subsequently set on the shared schemas and tables in the second Metastore.
- Central data governance manages the central containers and respective datasets for the central unit and business units.
- Permissions on the catalog level specify that the Central owner has use catalog and create schema permissions on the Central development and staging catalogs, with no access for other Business Units.
- The Central owner also has these permissions on the Central production catalog and the published catalogs for Business Unit 1 and Business Unit 2, where other Business Units can be granted use catalog permissions.
- In the second Metastore, the Central owner maintains use catalog and create schema permissions on the shared databases for the Business Unit 2 published, Business Unit 1 published, and Central published catalogs.
- In these catalogs, other Business Units can be granted use catalog permissions for region 2 specific ACLs.
- Business Unit 1 owns its production catalog and other catalogs, with use catalog and create schema permissions, while the Central team has no access unless Delta Sharing or Lakehouse Federation is set up.
- Business Unit 2 has identical permissions for its own catalogs.
- To access tables, use schema and select permissions must also be provided on the schema and table level.
- System account mappings remain the same as in the previously described single cloud-region scenario.
Phased Migration
- Large customers, especially when managing tens to hundreds of workspaces, typically avoid a big bang migration independent of workload type.
- Two security zones exist to manage this.
- The primary zone manages all access with fine-grained permissions.
- The secondary zone keeps projects that cannot be migrated due to business or technical reasons in the well-known standard cluster world to be migrated at a later time.
- The high-level two-zone setup involves splitting data into specific buckets or containers.
- Project data serves as the location for the data of non-migrated projects.
- Common data is an optional location for public data like weather and sociodemographic data or company data with a low level of confidentiality.
- Confidential data has no direct access by secondary zone workspaces and is available with fine-grained security for primary zone users.
- Two zones are created.
- One zone is secured for all migrated use cases and projects, where data is migrated to confidential data if necessary and metadata is centrally migrated.
- The other zone is for non-migrated projects based on classical workspaces and security.
- Different System Accounts are used for the different data locations.
- The secondary zone uses a standard cluster, while the primary zone uses a shared or single-user cluster.
- Projects might need data from the primary zone, such as confidential data.
- Due to security reasons, this cannot be provided directly.
- Options include open Delta Sharing, Lakehouse Federation, JDBC, or Python connector against SQL in the primary zone.
- To avoid confidential data being played back to the primary zone via common data, consider making common data read-only for secondary zone users.
- On Azure, customers prefer AAD tokens.
- While the connector works with AAD tokens, creating a user AAD token is an involved process and usually not an option for end users.
Machine Learning Setup
- In the machine learning setup, a data scientist creates features and training data where row-level security and column-level masking are respected using shared compute.
- The data scientist then creates a model from the features and training data using distributed machine learning or GPUs on single-user compute.
- Data from the catalog maps to a schema and tables, secured by row-level security or column-level masking, which is not accessible from single-user compute.
- Machine learning elements map to a schema containing features, training data, and models.
- The shared compute interacts with Delta Lake storage, and single-user compute interacts with both the shared elements and Delta Lake storage.
Top comments (0)