1. How to read this material
This material accompanies the first session of Module 8, which combines a fifty-minute exposition with group work. In class, the groups write blocks 1 to 4 of the Data Model Canvas for the partner. The grain and orphan checks in Metabase, described in Section 10, are not run in this session. The material develops in prose what the slides present in summary form and supports the rest of the canvas, which the groups complete during the sprint.
The text follows the order of the reasoning that the module asks of each group. It first explains why the partner problem is described before the dataset is queried, then presents the RM-ODP as the framework that organises that description into viewpoints, and finally shows how the blocks of the Data Model Canvas record the first two viewpoints. The last sections are practical. They give a procedure for reading the partner dataset in Metabase, the SQL queries that support each step, and the deliverables of Sprint 1.
An illustrative case runs through the material: a regional pharmacy chain whose stores often run out of continuous-use medicines. The case is fictitious. It was chosen because the problem is easy to grasp and because it involves the elements that every partner dataset contains, namely decision-makers, a recurring decision, rules that restrict the use of data and tables whose grain must be understood before any indicator is computed. The groups apply the same reasoning to the partner of the module, whose data is available in Metabase.
Keep the Data Model Canvas of the module open in another tab while reading. Sections 8 and 9 refer to its numbered blocks, and it is easier to follow them with the canvas in view.
2. Modelling the problem before the data
The first contact with a new dataset tends to follow the path of least resistance. The group opens the database, lists the tables, counts the rows, draws a histogram of each numeric column and records what it found. This activity produces knowledge about the shape of the data, which is necessary, but it does not produce knowledge about which part of the data matters. At the end of a sprint conducted in this way the group can describe hundreds of columns and still be unable to say which of them supports a decision of the partner.
The difficulty comes from the fact that relevance is not a property of the data. A column with the date of delivery of a purchase order is central if the partner needs to understand supplier delays, and it is irrelevant if the partner is concerned with the profitability of each store. The same table, read with different questions, yields different findings. Relevance therefore comes from the organisation, from the decisions that people take and from the rules that constrain those decisions, and it has to be described before the data can be read with purpose.
The consequence for the module is a change in the order of the work. The group first states who decides, which decision is at stake, how often it is taken and which rules cannot be broken. Only then does it read the dataset, looking for the facts that support that decision and noting the facts that are missing. The absence of a fact is itself a finding. If the partner wants to reduce stock-outs and the dataset contains sales but no stock positions, the group has discovered a limitation of the data that it must report to the partner before promising any indicator.
This order of work needs a framework that tells the group what to describe first and how the descriptions relate to each other. The module adopts the RM-ODP for that purpose, and the Data Model Canvas is the document in which the descriptions are written.
3. The RM-ODP standard
The Reference Model of Open Distributed Processing, known as RM-ODP, is an international standard developed jointly by ISO, IEC and ITU-T. It is published as ISO/IEC 10746 and, with identical text, as ITU-T Recommendations X.901 to X.904. Its purpose is to provide a common framework for specifying distributed systems, that is, systems whose components run on different machines, often belong to different organisations and must nevertheless cooperate under shared rules.
The standard is divided into four parts. Part 1 is an overview and explains the motivation and the main ideas. Part 2 defines the foundational concepts, such as object, interface, action and policy, which the other parts use. Part 3 defines the architecture, including the five viewpoints and the language that each one uses. Part 4 gives the formal semantics of those concepts. Parts 2 and 3 were revised in 2009. The enterprise language, which describes the organisational context of a system, was later detailed in a separate standard, ISO/IEC 15414, whose current edition dates from 2015.
The central idea of the RM-ODP is the separation of concerns through viewpoints. A viewpoint is a way of looking at the whole system that selects one set of concerns and ignores the others. The justification is practical. A single model that holds business rules, data structures, software components, servers and product choices at the same time becomes too large to read, and each change made by one specialist forces every other specialist to review it. When the specification is divided into viewpoints, each concern can be described in its own vocabulary, reviewed by the people responsible for it and changed without rewriting the rest.
Separating concerns creates a new obligation, because the viewpoints describe the same system and must not contradict each other. The RM-ODP addresses this obligation through correspondences, which are explicit statements of how an element of one viewpoint relates to an element of another. Section 7 shows that most of the quality of a Data Model Canvas depends on these correspondences.
A data platform gathers information produced by several areas of an organisation, transforms it through components that run on distributed infrastructure and delivers it to consumers who are subject to rules on access and use. Openness, distribution and shared rules are exactly the conditions for which the RM-ODP was written, which is why the module uses it as the backbone of the project.
4. The five viewpoints
Part 3 of the standard defines five viewpoints. Each one answers a different question about the same system, and the order in which they are usually presented goes from the most abstract, the purpose of the system, to the most concrete, the technologies that implement it. The diagram below summarises the question of each viewpoint in the vocabulary of a data platform.
Community, objectives, roles, processes and policies of the organisation that uses the platform.
Information objects, their relationships and the constraints that hold over them, with no reference to storage.
Objects that extract, transform and load data, and the interfaces through which they interact.
Nodes, channels and mechanisms that keep the functions reliable when they run on separate machines.
Products, standards and services that implement the specification, and their cost.
From purpose to implementation: each viewpoint constrains the next and must correspond to it.
The enterprise viewpoint describes the system as part of an organisation. It names the community that uses the system, the objective that this community pursues, the roles that people and systems play and the policies that constrain their behaviour. Section 5 develops it in detail.
The information viewpoint describes the information that the system handles, regardless of where and how it is stored. It specifies information objects, their attributes and relationships and the constraints over them through three kinds of schema, which section 6 explains.
The computational viewpoint decomposes the system into objects that perform functions and interact through interfaces. The standard distinguishes operation interfaces, in which clients invoke operations that either return a result or do not, signal interfaces, based on elementary events, and stream interfaces, which carry continuous flows. In a data platform, extraction, transformation and loading components and the APIs that expose the data belong to this viewpoint, which the module develops in Sprints 2 and 3.
The engineering viewpoint describes the mechanisms that support distribution. It deals with nodes, the channels that connect objects on different nodes and the distribution transparencies, which hide from the user the fact that the system is distributed. The standard lists eight of them: access, failure, location, migration, persistence, relocation, replication and transaction transparency. Orchestration, retries, reprocessing and partitioning are engineering concerns in the module.
The technology viewpoint, finally, records the choice of products and standards that implement the system and checks whether the implementation conforms to the specification. Python, Docker, Spark, Prefect, cloud services and their prices belong here.
How the module follows the viewpoints
The five sprints of the module are grouped into three blocks, each devoted to the viewpoints that answer its question. The first block asks what the platform must deliver and covers the enterprise and information viewpoints in Sprint 1. The second asks how the data is processed and covers the computational viewpoint in Sprints 2 and 3. The third asks where and with what the platform runs and covers the engineering and technology viewpoints in Sprints 4 and 5.
| Block | Sprints | Viewpoints | Main topics |
|---|---|---|---|
| What | 1 | Enterprise Information | Data Model Canvas, exploratory data analysis, market and risk analysis |
| How | 2–3 | Computational | Medallion architecture, ETL from object storage, data warehouse, data cubes and data marts, DataApp package |
| Where | 4–5 | Engineering Technology | DAG orchestration, automated tests, metrics and telemetry, cloud pricing, security and access |
This sequence explains a recommendation that recurs throughout Sprint 1. Tool choices made in the first weeks are provisional, because they belong to the technology viewpoint and depend on decisions that the group has not yet taken. A group that chooses a database before stating the grain of its facts is likely to revise that choice later, and each revision costs more than the previous one.
5. The enterprise viewpoint
The enterprise viewpoint places the system inside the organisation that uses it. Its vocabulary is defined by ISO/IEC 15414 and revolves around a few concepts that the group will use in the canvas. A community is a group of actors formed to achieve an objective. The objective is the practical result that the community expects, and it must be stated so that someone can verify whether it was achieved. A role is a position in the community, defined by the behaviour expected of whoever holds it and independent of the person. A process is the sequence of steps through which the community pursues its objective. A policy is a rule that constrains behaviour, expressed as an obligation, a permission, a prohibition or an authorisation.
These concepts matter for data work because each one leaves a trace in the data. Roles determine who may see which records, which is why the governance blocks of the canvas name a data owner, a data steward and a data custodian. Processes generate the events that the dataset records, so a sale, a stock count or a delivery appears as a row only because a process produced it. Policies restrict the use of the data, and in Brazil the most important of them is the Lei Geral de Proteção de Dados (Brazil's General Data Protection Law, LGPD), which classifies health data as sensitive personal data and subjects its processing to stricter conditions.
Describing the enterprise viewpoint therefore means answering a short list of questions with the partner. Who takes the decision that the platform supports? Which decision is it, and how often is it taken? Which process produces the data that the decision depends on? Which rule cannot be broken, whatever the result of the analysis? Who is accountable for each dataset? A group that cannot answer these questions is not yet ready to choose indicators, because any indicator it chooses would rest on an assumption about the organisation that nobody has confirmed.
The enterprise viewpoint in the illustrative case
In the pharmacy chain, the community is formed by the store managers, the purchasing team, the pharmacists and the regional director. The objective is to reduce stock-outs of continuous-use medicines, which are the products that patients cannot stop taking and whose absence makes them look for another pharmacy. The decision at stake is the weekly order quantity for each product in each store, taken by the purchasing team on the basis of a suggestion produced by the current system. The purchasing director is the data owner, and an analyst of the purchasing team acts as data steward.
Process
Sales reduce the stock of a store. The system suggests an order, the purchasing team approves or changes it, the supplier delivers and the store records the receipt, which increases the stock again.
Policies
Health data is sensitive personal data under the LGPD (art. 5, II, and art. 11), and the chain's policy forbids using identifiable prescription data for marketing. Store managers are permitted to see the data of their own store only.
Each of these statements will be checked against the data. If the dataset shows that orders are placed daily and not weekly, the description of the decision was wrong and must be corrected. If prescription data appears in the same table as sales, the group knows from the start that the platform must separate or mask it, and it records that need in the governance blocks of the canvas.
6. The information viewpoint
The information viewpoint describes the information that the system handles without saying how it is stored or processed. Its basic element is the information object, which represents something the organisation needs to know about, such as a store, a product or a sale. Information objects have attributes and relationships, and the viewpoint also states the constraints that hold over them. Part 3 of the standard organises the description into three kinds of schema, and the distinction between them is useful in data work because each kind corresponds to a different type of check.
Invariant schema
Constraints that must hold in every state of the system. Stock on hand is never negative, and every sale line refers to a product that exists.
Static schema
The state of the information objects at a given instant, such as the stock position of each product in each store at midnight of a given day.
Dynamic schema
The changes of state that are allowed over time. A purchase order moves from created to approved and then to received, or it is cancelled.
The invariant schema becomes the list of quality checks of the platform. Each invariant is a condition that can be tested with a query, and each violation found in the dataset is either an error in the data or a sign that the group misunderstood the rule. The static schema determines the snapshots that the platform must keep, and it is the origin of periodic snapshot fact tables in the dimensional model. The dynamic schema describes the life cycle of the objects, and it determines whether the platform needs to keep the history of each change or only the current state.
Grain as an information decision
The most consequential decision of the information viewpoint in a data platform is the grain, which states what a single row of a fact table represents. Kimball and Ross place the declaration of the grain at the centre of dimensional design, before the choice of dimensions and facts, because every measure and every indicator depends on it. Saying that a fact table holds one row per product, store and day fixes the level of detail at which questions can be answered. With that grain it is possible to compute the weekly stock-out rate of a store, but it is impossible to know at which hour of the day the stock reached zero.
The grain must be stated in one sentence and checked against the data. A grain that the group declares and that the data does not respect, because the same product, store and day appear twice, produces indicators that count some days twice. Section 10 shows the query that detects this situation.
The information viewpoint in the illustrative case
The decision about order quantities needs information about sales, stock and orders. Before opening the dataset, the group writes the objects it expects to find. The reading of the data will confirm, correct or extend this list.
| Information object | Identifier and main attributes | Relationships |
|---|---|---|
store | store_id, city, region | has many stock positions and many sale lines |
product | product_id, name, continuous_use | supplied by one supplier |
supplier | supplier_id, name, lead_time_days | supplies many products and receives many purchase orders |
sale_line | sale_id, product_id, store_id, quantity, sold_at | refers to one product and one store |
stock_position | store_id, product_id, date, on_hand | one row per product, store and day |
purchase_order | order_id, supplier_id, store_id, status, created_at | has many order lines, one per product |
The indicator that answers the objective can now be defined in information terms. The weekly stock-out rate of a store is the number of product-store-days in which on_hand equals zero, divided by the number of product-store-days observed in the week, restricted to continuous-use products. The definition names the objects it uses, the grain at which it is computed and the period over which it is aggregated, which is what the canvas requires of every KPI.
7. Correspondences and traceability
The viewpoints are useful only if they remain consistent with each other. In the RM-ODP this consistency is expressed through correspondences, and in a data platform the most important correspondences link the enterprise viewpoint to the information viewpoint. Every KPI should trace back to an objective, every information object should be needed by at least one KPI or policy, and every policy that restricts data should be reflected in the classification of the objects it concerns.
stock_position, product, storeThe chain above can be read in both directions, and each direction reveals a different defect. Read from left to right, it shows whether an objective has been translated into something measurable. An objective that does not reach a KPI indicates that the information viewpoint is incomplete. Read from right to left, it shows whether the work on the data serves the partner. A table that does not reach any objective may be interesting, but it does not belong to the canvas until someone in the community needs it.
The same reasoning underlies the requirements traceability matrix that the module uses in later sprints, in which each functional requirement is linked to a business rule, a test and the evidence that the test passed. The canvas is the first place where this traceability appears, and a group that builds it carefully in Sprint 1 will find the later matrices easier to write.
A KPI that cannot be traced back to an objective is removed from the canvas. An objective without a KPI is kept, and it is marked in block 6 as an open decision to be discussed with the partner.
8. The Data Model Canvas of the module
The Data Model Canvas of the module is a structured document, available on the module home page, that gathers the description of the data platform in numbered blocks. It exports its content as JSON, so that the group can version it in the repository, and as PDF. The canvas is related to the Data Product Canvas presented in self-study 2, which also aligns business and technical areas around the problem that a data product solves, but its blocks follow the viewpoints of the RM-ODP and the topics of the module.
The blocks are organised into groups, and each group belongs mainly to one or two viewpoints. Knowing the viewpoint of each group tells the team when that group can be completed with confidence, because a block that belongs to a viewpoint the module has not yet covered can only receive provisional entries.
| Canvas group | Blocks | Viewpoint | Completed in |
|---|---|---|---|
| Business | 1 business objectives · 2 analytical questions · 3 business processes | Enterprise | Sprint 1 |
| Analytical consumption | 4 KPIs and key metrics · 5 users and forms of consumption · 6 open decisions and risks | Enterprise Information | Sprint 1 |
| Corporate governance | 7 roles and owners · 8 policies and compliance · 9 metadata and maturity | Enterprise Information | Sprint 1 |
| Cube | a–g dimensional model: grain, structure, fact type, facts, metrics, dimensions, special dimensions · h–l data: sources, transformations, quality, history, optimisation · m–p governance: classification, access, life cycle, catalogue | Information | Sprints 1–3 |
| ETL architecture | 10 sources and extraction · 11 layers and zones · 12 orchestration · 13 load and reprocessing · 14 quality checks · 15 telemetry and cost · 16 flow diagram | Computational Engineering | Sprints 2–4 |
| Architectural tactics | problem, quality attribute, tactic, implementation, discarded alternatives, evidence, consequences, diagram | Engineering Technology | Sprints 4–5 |
The table shows that the canvas is a document that grows with the module. In Sprint 1 the group writes the business, analytical consumption and governance groups and a first cube. The ETL architecture and the architectural tactics may receive provisional entries in Sprint 1, for instance the list of sources in block 10, and they are revised when the module reaches the computational and engineering viewpoints. A canvas whose later blocks are already full in the first week is a warning sign, because those blocks depend on decisions that the earlier blocks have not yet justified.
Export the canvas as JSON at the end of each working session and commit the file to the repository under /docs/data_model_canvas/. The JSON can be imported again into the canvas, so the repository keeps a dated record of how the group's description of the partner changed.
9. Writing the Sprint 1 blocks
A block of the canvas is complete when another reader, with access to the partner and to the data, can verify what it says. This criterion excludes generic entries such as "improve decision-making" or "use data to generate value", which are true of every project and therefore say nothing about this one. The paragraphs below describe what a verifiable entry looks like in each group of Sprint 1, using the illustrative case as an example.
Business, blocks 1 to 3
Business objectives are stated as results that can be checked, preferably with a direction and a measure, as in "reduce the stock-out rate of continuous-use medicines". Analytical questions are phrased as the decision-maker would ask them, in the language of the business and not in the language of the database, as in "which stores run out most often, and of which products?". Business processes are named by a verb and an object, such as "replenish store stock" or "receive supplier delivery", because a process is something the organisation does and its name should say what is done.
Analytical consumption, blocks 4 to 6
Each KPI in block 4 has a formula, a unit and a periodicity, and the formula refers to information objects that the group expects to find in the data. Each user in block 5 is linked to the channel through which the data reaches them, such as a weekly dashboard for the purchasing team or an alert for store managers. Block 6 records open decisions and risks, and each entry is written as a question with an owner, for example "does the partner accept a daily grain, given that orders are weekly? Owner: purchasing director". An open decision without an owner tends to remain open until the end of the module.
Corporate governance, blocks 7 to 9
Block 7 names the people or areas that hold the roles of data owner, data steward, data custodian and technical lead. Block 8 states the policies that apply, starting with the LGPD, and classifies the personal and sensitive data that the dataset contains. Block 9 says where the data catalogue lives, which governance indicators the group will track and how it intends to assess the maturity of data management. In Sprint 1 these entries are short, but they must exist, because they determine the access rules that the platform will implement in Sprint 5.
The first cube, blocks a to f
The first cube is the bridge between the analytical questions and the data. Its grain fits in one sentence. Its structure is usually a star schema at this stage. Its fact type is chosen among transaction, periodic snapshot and accumulating snapshot, and in the illustrative case the stock position is a periodic snapshot, because it records the state of each product in each store at regular intervals. Facts and metrics are listed with their units, and each dimension answers at least one analytical question from block 2.
| Block | Generic entry | Verifiable entry in the illustrative case |
|---|---|---|
| 1 Objective | Improve inventory management | Reduce the weekly stock-out rate of continuous-use medicines |
| 2 Question | Analyse stock data | Which stores run out most often, and of which products? |
| 4 KPI | Stock level | Stock-out rate = product-store-days with on_hand = 0 ÷ product-store-days observed; proportion between 0 and 1; weekly |
| 7 Roles | The business team | Data owner: purchasing director. Data steward: purchasing analyst |
| a Grain | Stock data | One row per product, store and day |
10. Reading the partner dataset in Metabase
With a draft of the enterprise and information viewpoints in hand, the group reads the partner dataset in order to confirm or correct it. Metabase allows two kinds of reading. The data browser shows each table, its columns and a sample of its rows, which is enough for the first contact. The SQL editor, available under the option to create a new SQL query, allows the group to run the checks below. The table and column names in the examples belong to the illustrative case and must be replaced by those of the partner.
The procedure has five steps, repeated table by table. It is deliberately simple, because its purpose is to produce entries for the canvas and not a complete statistical description of the data, which is the subject of Lesson 2.
Step 1. Inventory
The inventory records, for each table, how many rows it has and which period it covers. The period matters because an indicator computed on two weeks of data cannot support a decision that depends on seasonality, and the group must know this before promising a trend.
SELECT COUNT(*) AS row_count,
MIN(sold_at) AS first_sale,
MAX(sold_at) AS last_sale
FROM sale_line;
Step 2. Grain and keys
For each table, the group writes in one sentence what a row represents and which columns identify it, and then checks that statement against the data. If the declared key repeats, either the grain is different from what the group assumed or the data contains duplicates, and both cases must be recorded.
-- Declared grain: one row per product, store and day
SELECT store_id, product_id, date, COUNT(*) AS rows_per_key
FROM stock_position
GROUP BY store_id, product_id, date
HAVING COUNT(*) > 1
ORDER BY rows_per_key DESC;
Step 3. Relationships
Relationships are found by looking for columns that appear in more than one table with the same meaning. Each relationship is then tested for orphan rows, that is, rows that refer to a record that does not exist. Orphans are frequent in real datasets, especially when tables are extracted from different systems at different moments, and they determine whether a join will silently lose data.
SELECT COUNT(*) AS orphan_lines
FROM sale_line s
LEFT JOIN product p ON p.product_id = s.product_id
WHERE p.product_id IS NULL;
Step 4. Quality
The quality step measures null rates, duplicates and values out of the expected range. Each check corresponds to a candidate invariant of the information viewpoint. When the check fails, the group does not correct the data at this stage. It records the violation, its volume and its probable cause, because the treatment belongs to the transformation layers that the module builds in Sprint 2.
SELECT COUNT(*) AS row_count,
AVG(CASE WHEN product_id IS NULL THEN 1.0 ELSE 0 END) AS product_id_null_rate,
AVG(CASE WHEN on_hand IS NULL THEN 1.0 ELSE 0 END) AS on_hand_null_rate,
SUM(CASE WHEN on_hand < 0 THEN 1 ELSE 0 END) AS negative_stock_rows
FROM stock_position;
Step 5. Back to the canvas
The last step closes the loop with the enterprise viewpoint. For each table, the group writes which analytical question of block 2 it supports. Tables that support no question are recorded in the inventory and set aside, and questions that no table supports are recorded in block 6 as risks. When a KPI can be computed, the group writes the query that computes it, which tests the definition written in block 4.
SELECT DATE_TRUNC('week', sp.date) AS week,
sp.store_id,
sp.product_id,
AVG(CASE WHEN sp.on_hand <= 0 THEN 1.0 ELSE 0 END) AS stockout_rate
FROM stock_position sp
JOIN product p ON p.product_id = sp.product_id
WHERE p.continuous_use = TRUE
AND sp.on_hand IS NOT NULL
GROUP BY 1, 2, 3
ORDER BY 1, 2, 3;
The average of an indicator that is one on stock-out days and zero otherwise equals the number of stock-out days divided by the number of days observed, which is the definition of the KPI, provided that the grain check of step 2 found no duplicated days. Days without a recorded stock position are left out of the denominator, and a negative stock count is treated as a stock-out, so both decisions should be recorded in the canvas. Writing the query is therefore a way of checking that the definition is computable with the grain the group declared. The query uses PostgreSQL syntax, and functions such as DATE_TRUNC must be adapted to the database engine that Metabase reads for the partner.
The same checks in the Sprint 1 notebook
The Sprint 1 deliverable asks for the analysis in a Jupyter Notebook with Apache Spark. The checks above translate directly into the DataFrame API, so the queries written in Metabase become the first cells of the notebook.
from pyspark.sql import SparkSession, functions as F
spark = SparkSession.builder.appName("dmc").getOrCreate()
stock_position = spark.read.parquet("<path-to-stock_position>")
duplicates = (
stock_position
.groupBy("store_id", "product_id", "date")
.count()
.filter(F.col("count") > 1)
)
duplicates.show()
11. Sprint 1 deliverables and toolchain
Sprint 1 has two graded deliverables on Adalove, both due at the Sprint Review on Friday, October 23, and both written in the enterprise and information viewpoints. The first is the Data Discovery with Data Model Canvas, with weight 4, which combines a complete canvas with a data analysis in a Jupyter Notebook using Apache Spark, focused on discovering opportunities in the partner context, and is stored under /docs/data_model_canvas/. The second is the Market and Risk Analysis Workbook, with weight 3, which begins with a Value Proposition Canvas of the jobs, pains and gains of the partner's customers and is stored as /docs/Market-and-Risk-Analysis-Workbook.md.
The two deliverables depend on each other. The customers whose jobs, pains and gains appear in the Value Proposition Canvas are the community of the enterprise viewpoint, and the decisions they take are the analytical questions of block 2 of the canvas. A group that writes the canvas first and derives the value proposition from the same description of the partner will produce a consistent pair, whereas a group that writes them in parallel and in isolation will have to reconcile them at the end.
Pre-class task for Lesson 2
Lesson 2, on Monday, follows a flipped format. The class time goes to the exploratory analysis of the partner data and to a presentation by each group, so three tasks must be done before the session. Every member prepares the environment below, the group downloads the starter notebook and runs its steps 1 and 2 on the synthetic data, and everyone reads the sections of the Lesson 2 material on steps 1 to 4. Monday starts with a short check on that work.
# Python 3.12, used throughout the module
python3.12 --version # Windows: py -3.12 --version
# Docker and Docker Compose, for Metabase, databases and later services
docker --version
docker compose version
# MkDocs, which publishes the /docs folder of the repository
pipx install mkdocs
mkdocs new . # once, at the repository root
mkdocs serve
# Java 17, required by Apache Spark in the Sprint 1 notebook
java -version
# Poetry, which manages the environment of the notebooks
pipx install poetry
poetry --version
The branch, commit and pull request conventions of the group repository follow the quality criteria document of self-study 5, which is assessed throughout the module and counts towards the Sprint 5 grade. Self-study 4 explains the difference between containers and virtual machines, which helps to understand why the module runs its services in Docker.
12. Recurring mistakes
Some mistakes recur in the first version of the canvas, and most of them come from skipping the enterprise viewpoint. The first is to fill block 4 with the columns of the dataset, such as "quantity" or "price", instead of indicators with formula, unit and periodicity. A column is raw material for an indicator, and listing it in block 4 means that the group has not yet decided what to measure.
The second mistake is to write objectives that cannot be verified, such as "optimise operations". Such an objective cannot be traced to any KPI, so the correspondence chain breaks at its first link. The third is to leave the governance blocks empty in Sprint 1 on the grounds that security is a topic of Sprint 5. The access rules implemented in Sprint 5 come from the roles and policies of blocks 7 and 8, and if those blocks are empty the group will have to invent the rules late in the module.
The fourth mistake is to declare a grain without checking it. The query of step 2 takes seconds to run, and skipping it may mean that every indicator of the project double counts part of the data. The fifth, finally, is to fill the ETL and tactics blocks in the first week with tools chosen before the problem was understood. These entries are not wrong in themselves, but they should be marked as provisional and revisited when the module reaches the corresponding viewpoints.
13. Checklist
Use the list below to check the state of the canvas before the Sprint 1 review. Click an item to mark it as done.
- The community, the decision-maker and the decision at stake are named in blocks 1 to 3.
- Each objective in block 1 can be verified and reaches at least one KPI in block 4.
- Each KPI has a formula, a unit and a periodicity, and refers to information objects found in the data.
- Each analytical question in block 2 is supported by at least one table, or is recorded as a risk in block 6.
- Owner, steward and custodian are named in block 7.
- Personal and sensitive data are identified and classified under the LGPD in block 8.
- The grain of the first cube is stated in one sentence and was checked with a query.
- Orphan rows, null rates and invariant violations are recorded with their volume.
- Entries in the ETL and tactics blocks are marked as provisional.
- The canvas was exported as JSON and committed under
/docs/data_model_canvas/. - Python 3.12, Java 17, Poetry, Docker, Docker Compose and MkDocs work on every member's machine.
- The group ran steps 1 and 2 of the Lesson 2 starter notebook.
14. References
- ISO/IEC 10746-1:1998. Information technology — Open Distributed Processing — Reference model: Overview. Also published as ITU-T Recommendation X.901.
- ISO/IEC 10746-2:2009. Information technology — Open Distributed Processing — Reference model: Foundations. Also published as ITU-T Recommendation X.902.
- ISO/IEC 10746-3:2009. Information technology — Open Distributed Processing — Reference model: Architecture. Also published as ITU-T Recommendation X.903.
- ISO/IEC 10746-4:1998. Information technology — Open Distributed Processing — Reference model: Architectural semantics. Also published as ITU-T Recommendation X.904.
- ISO/IEC 15414:2015. Information technology — Open distributed processing — Reference model — Enterprise language. Also published as ITU-T Recommendation X.911.
- LININGTON, P. F.; MILOSEVIC, Z.; TANAKA, A.; VALLECILLO, A. Building Enterprise Systems with ODP: An Introduction to Open Distributed Processing. Boca Raton: CRC Press, 2011.
- KIMBALL, R.; ROSS, M. The Data Warehouse Toolkit: The Definitive Guide to Dimensional Modeling. 3rd ed. Indianapolis: Wiley, 2013.
- BRASIL. Lei nº 13.709, de 14 de agosto de 2018. Lei Geral de Proteção de Dados Pessoais (LGPD).