<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://home.stonezhong.net/index.php?action=history&amp;feed=atom&amp;title=Dl%2FDataUnit</id>
	<title>Dl/DataUnit - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://home.stonezhong.net/index.php?action=history&amp;feed=atom&amp;title=Dl%2FDataUnit"/>
	<link rel="alternate" type="text/html" href="https://home.stonezhong.net/index.php?title=Dl/DataUnit&amp;action=history"/>
	<updated>2026-10-04T00:53:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://home.stonezhong.net/index.php?title=Dl/DataUnit&amp;diff=317&amp;oldid=prev</id>
		<title>Stonezhong: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="https://home.stonezhong.net/index.php?title=Dl/DataUnit&amp;diff=317&amp;oldid=prev"/>
		<updated>2023-08-23T06:35:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:35, 23 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;id:  UUID&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;id:  UUID&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Primary key&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Primary key&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dataset_id: UUID&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    A dataset that owns this data unit.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;publisher: str&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;publisher: str&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key homewiki:diff::1.12:old-309:rev-317 --&gt;
&lt;/table&gt;</summary>
		<author><name>Stonezhong</name></author>
	</entry>
	<entry>
		<id>https://home.stonezhong.net/index.php?title=Dl/DataUnit&amp;diff=309&amp;oldid=prev</id>
		<title>Stonezhong: Created page with &quot;&lt;p&gt; Data Lake Knowledge Center | Models&lt;/p&gt;  = Introduction = &lt;div class=&quot;toccolours mw-collapsible mw-collapsed expandable&quot;&gt; &lt;div class=&quot;mw-collapsible-preview&quot;&gt;Definition&lt;/div&gt; &lt;div class=&quot;mw-collapsible-content&quot;&gt; &lt;big&gt;&lt;b&gt;A DataUnit object represent the basic unit that carries data.&lt;/b&gt;&lt;/big&gt;  &lt;b&gt;Fields&lt;/b&gt; &lt;pre&gt;&lt;nowiki&gt; id:  UUID     Primary key  publisher: str     Represent user who published this data unit. In case people has question about...&quot;</title>
		<link rel="alternate" type="text/html" href="https://home.stonezhong.net/index.php?title=Dl/DataUnit&amp;diff=309&amp;oldid=prev"/>
		<updated>2023-08-23T06:21:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;p&amp;gt; &lt;a href=&quot;/index.php/Dl/home&quot; title=&quot;Dl/home&quot;&gt;Data Lake Knowledge Center&lt;/a&gt; | &lt;a href=&quot;/index.php/Dl/Models&quot; title=&quot;Dl/Models&quot;&gt;Models&lt;/a&gt;&amp;lt;/p&amp;gt;  = Introduction = &amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed expandable&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;mw-collapsible-preview&amp;quot;&amp;gt;Definition&amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt; &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;A DataUnit object represent the basic unit that carries data.&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;  &amp;lt;b&amp;gt;Fields&amp;lt;/b&amp;gt; &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; id:  UUID     Primary key  publisher: str     Represent user who published this data unit. In case people has question about...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;p&amp;gt; [[dl/home|Data Lake Knowledge Center]] | [[Dl/Models|Models]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed expandable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-preview&amp;quot;&amp;gt;Definition&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;b&amp;gt;A DataUnit object represent the basic unit that carries data.&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
id:  UUID&lt;br /&gt;
    Primary key&lt;br /&gt;
&lt;br /&gt;
publisher: str&lt;br /&gt;
    Represent user who published this data unit. In case people has question about this data unit, they should contact the publisher for clarification.&lt;br /&gt;
&lt;br /&gt;
published_time: DateTime&lt;br /&gt;
    Represent the time this data object is published. A data unit object is only visible and accessible to user once it is published.&lt;br /&gt;
&lt;br /&gt;
locations: List[DataLocation]&lt;br /&gt;
    Represent a list of locations this data exists. The content of the data should be exactly the same for different locations. For example, one location could be for&lt;br /&gt;
    ETL pipeline, another location could be for backup/archive. It is also possible the actual payload gets replicated to multiple region with the same content, user &lt;br /&gt;
    can choose the closest data to read for performance consideration. But nevertheless, the content of the data for different locations should be exactly the same. &lt;br /&gt;
    Note, every object in DataLake has lables, you can have &amp;quot;purpose&amp;quot; label attached to different location object to distinguish those different purposes.&lt;br /&gt;
&lt;br /&gt;
is_recalled: boolean&lt;br /&gt;
    If the publisher want to recall the data unit, they can set this flag to True. User should in general ignore the recalled data unit, unless for troubleshooting &lt;br /&gt;
    purpose.&lt;br /&gt;
&lt;br /&gt;
recall_time: DateTime&lt;br /&gt;
    If the data unit is recalled, this represent the time the data unit is recalled.&lt;br /&gt;
&lt;br /&gt;
schema: DataType&lt;br /&gt;
    The schema of the data.  Not all data unit object represent structured data, for example, a data unit object could represent a JPEG image. However, when a data unit &lt;br /&gt;
    represent structured data, the this field describe the schema of the data.   &lt;br /&gt;
&lt;br /&gt;
sources: List[DataUnit]&lt;br /&gt;
    Represent a list of the other data unit that is being used to produce this data unit. This allows us to trace back any data related problem to the root cause.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Methods&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;  &lt;br /&gt;
@property&lt;br /&gt;
def is_dirty(self) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Returns True if any of the transitive source data unit being recalled. In such case, this data unit should be re-constructed to maintain data accuracy and integrity.&lt;br /&gt;
&lt;br /&gt;
For example, if data unit A is for report A and data unit B is for report B, they both consumes data unit X and Y, and latter X is recalled, and if only A is &lt;br /&gt;
re-constructed without B, the dashboard build on top of A will be inconsistent against dashboard build on top of B, and causes lots of customer confusion. &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Examples&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    id: &amp;quot;aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa&amp;quot;,&lt;br /&gt;
    publisher: &amp;quot;stone.zhong@gmail.com&amp;quot;,&lt;br /&gt;
    pubish_time: &amp;quot;2023-08-20 00:00:00&amp;quot;,&lt;br /&gt;
    is_recalled: False,&lt;br /&gt;
    recall_time: None,&lt;br /&gt;
    schema_id: &amp;quot;bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb&amp;quot;,&lt;br /&gt;
    source_ids: [&amp;quot;11111111-1111-1111-1111-111111111111&amp;quot; ,&amp;quot;22222222-2222-2222-2222-222222222222&amp;quot;],&lt;br /&gt;
    location_ids: [&amp;quot;33333333-3333-3333-3333-333333333333&amp;quot;, &amp;quot;44444444-4444-4444-4444-444444444444&amp;quot;]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Considerations =&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed expandable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-preview&amp;quot;&amp;gt;Data Unit is immutable&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
So when you re-construct a dirty data unit, you should create a new data unit and set the original data unit as &amp;quot;recalled&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stonezhong</name></author>
	</entry>
</feed>