{"id":8017,"date":"2015-05-25T11:13:11","date_gmt":"2015-05-25T15:13:11","guid":{"rendered":"http:\/\/www.iri.com\/blog\/?p=8017"},"modified":"2024-05-20T13:12:08","modified_gmt":"2024-05-20T17:12:08","slug":"scd-type-4","status":"publish","type":"post","link":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/","title":{"rendered":"SCD Type 4"},"content":{"rendered":"<p>Dimensional data that change slowly or unpredictably are captured in <a href=\"http:\/\/www.iri.com\/blog\/data-transformation2\/introduction-to-slowly-changing-dimensions-scd\/\" target=\"_blank\" rel=\"noopener\">Slowly Changing Dimensions<\/a> (SCD) analyses. In a data warehouse environment, a dimension table has a primary key that uniquely identifies each record and other pieces of information that are known as the dimensional data.<\/p>\n<p>All the update methods for the different SCD types are accomplished using the <a href=\"http:\/\/www.iri.com\/products\/cosort\/sortcl\" target=\"_blank\" rel=\"noopener\">SortCL<\/a> program in <a href=\"http:\/\/www.iri.com\/products\/cosort\" target=\"_blank\" rel=\"noopener\">IRI CoSort<\/a>. In the full <a href=\"http:\/\/www.iri.com\/products\/voracity\" target=\"_blank\" rel=\"noopener\">IRI Voracity<\/a> ETL and data management platform, there is a graphical wizard in its <a href=\"https:\/\/www.iri.com\/products\/workbench\/voracity-gui\">IRI Workbench<\/a> front-end to create the SCD job scripts for SortCL to run.<\/p>\n<p>Most SCD types use a full outer join to match records from the original data source with records in the updated source based on equating a key from each. Type 4, however, accomplishes the update using a sort.<\/p>\n<p><strong>Type 4 SCD<\/strong><\/p>\n<p>The Type 4 model is similar to that for <a href=\"http:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-2\/\" target=\"_blank\" rel=\"noopener\">Type 2<\/a>. The difference is that there are 2 tables or files that are maintained: one for the current costs and one to hold the history records for the costs. When new current records are added to the master, these new records are usually added to the history at the same time.<\/p>\n<p>The field definitions are the same in the update, the history and the master files or tables. We will sort the records for the update and history together. A new master will be created that only has one record for each <em>ProductCode<\/em> and that record will be the most current. The history will have all the records for each <em>ProductCode<\/em> including the ones from the update source.<\/p>\n<p>The starting master table will be the same as the starting master from our example of <a href=\"http:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-1\/\" target=\"_blank\" rel=\"noopener\">Type 1<\/a> with values as shown below.<\/p>\n\n<table id=\"tablepress-10\" class=\"tablepress tablepress-id-10\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">ProductCode<\/th><th class=\"column-2\">Cost<\/th><th class=\"column-3\">StartDate<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">C123<\/td><td class=\"column-2\">125.50<\/td><td class=\"column-3\">20110228<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2365.00<\/td><td class=\"column-3\">20120101<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">19.25<\/td><td class=\"column-3\">20110930<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">450.50<\/td><td class=\"column-3\">20110430<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">98.75<\/td><td class=\"column-3\">20110515<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-10 from cache -->\n<p>All the update data will all have the same StartDate. The update.dat source contains records with the following values:<\/p>\n\n<table id=\"tablepress-11\" class=\"tablepress tablepress-id-11\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">ProductCode<\/th><th class=\"column-2\">Cost<\/th><th class=\"column-3\">StartDate<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2425.00<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">550.50<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">M447<\/td><td class=\"column-2\">101.75<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">101.75<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-11 from cache -->\n<p>The starting history source below is like the starting master in the Type 2. So Type 4 is a combination of Type 1 and Type 2 where the master is the same as a Type 1 master and the history is the same as a Type 2 master.<\/p>\n\n<table id=\"tablepress-18\" class=\"tablepress tablepress-id-18\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">ProductCode<\/th><th class=\"column-2\">Cost<\/th><th class=\"column-3\">StartDate<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">C123<\/td><td class=\"column-2\">125.50<\/td><td class=\"column-3\">20110228<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2365.00<\/td><td class=\"column-3\">20120101<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">19.25<\/td><td class=\"column-3\">20110930<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">21.25<\/td><td class=\"column-3\">20110501<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">450.50<\/td><td class=\"column-3\">20110430<\/td>\n<\/tr>\n<tr class=\"row-7 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">425.25<\/td><td class=\"column-3\">20101001<\/td>\n<\/tr>\n<tr class=\"row-8 even\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">385.25<\/td><td class=\"column-3\">20100215<\/td>\n<\/tr>\n<tr class=\"row-9 odd\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">98.75<\/td><td class=\"column-3\">20110515<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-18 from cache -->\n<p>In IRI Workbench, there is a Voracity wizard to assist in the creation of scripts for updating Dimensional files and tables. This wizard is located in the Voracity dropdown on the navigation bar. First you pick the SCD type. Then the window where you select the sources that are used for processing the update is displayed.<\/p>\n<p><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image001-3.png\" rel=\"attachment wp-att-8699\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8699 size-full\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image001-3-e1450818992879.png\" alt=\"image001\" width=\"600\" height=\"589\" \/><\/a><br \/>\nThe next screen is where you set up the sort by selecting the keys. There are 2 keys: <em>ProductCode<\/em> then <em>StartDate<\/em>. We are grouping by <em>ProductCode<\/em>, but we also need to sort in descending order by <em>StartDate<\/em> within each <em>ProductCode<\/em> grouping. This is so that we can filter the most recent record for each <em>ProductCode<\/em> group to the new master.<\/p>\n<p><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image003-3.png\" rel=\"attachment wp-att-8700\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8700 size-full\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image003-3-e1450819030979.png\" alt=\"image003\" width=\"600\" height=\"589\" \/><\/a><\/p>\n<p>To make the <em>StartDate<\/em> a key that sorts in descending order, select that key and then select <strong>Edit Key<\/strong>. This will bring up the following screen:<\/p>\n<p><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\" rel=\"attachment wp-att-8701\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8701\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\" alt=\"image005\" width=\"525\" height=\"450\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png 525w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1-300x257.png 300w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<p>In the dropdown for <strong>Direction<\/strong> select <strong>Descending<\/strong>.<\/p>\n<p>Here is the job script for the sort:<\/p>\n<pre>\/INFILE=C:\/IRI\/CoSort95\/workbench.orig\/workspace\/SCD\/SCD4\/history4.dat\r\n    \/PROCESS=DELIMITED\r\n    \/ALIAS=history4\r\n    \/FIELD=(PRODUCTCODE, TYPE=ASCII, POSITION=1, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(COST, TYPE=NUMERIC, POSITION=2, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(STARTDATE, TYPE=ASCII, POSITION=3, SEPARATOR=\",\", FRAME='\\\"')\r\n\/INFILE=C:\/IRI\/CoSort95\/workbench.orig\/workspace\/SCD\/update.dat\r\n    \/PROCESS=DELIMITED\r\n    \/ALIAS=update\r\n    \/FIELD=(PRODUCTCODE, TYPE=ASCII, POSITION=1, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(COST, TYPE=NUMERIC, POSITION=2, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(STARTDATE, TYPE=ASCII, POSITION=3, SEPARATOR=\",\", FRAME='\\\"')\r\n\r\n\/SORT\r\n    \/KEY=(PRODUCTCODE, TYPE=ASCII)\r\n    \/KEY=(STARTDATE, DESCENDING, TYPE=ASCII)\r\n\r\n\/OUTFILE=history4.dat\r\n # This file will contain all the records from both inputs\r\n    \/PROCESS=DELIMITED\r\n    \/FIELD=(PRODUCTCODE, TYPE=ASCII, POSITION=1, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(COST, TYPE=NUMERIC, POSITION=2, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(STARTDATE, TYPE=ASCII, POSITION=3, SEPARATOR=\",\", FRAME='\\\"')\r\n\r\n\/OUTFILE=master4.dat\r\n# Include only one record for each ProductCode\r\n    \/PROCESS=DELIMITED\r\n    \/FIELD=(PRODUCTCODE, TYPE=ASCII, POSITION=1, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(COST, TYPE=NUMERIC, POSITION=2, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/FIELD=(STARTDATE, TYPE=ASCII, POSITION=3, SEPARATOR=\",\", FRAME='\\\"')\r\n    \/INCLUDE WHERE PRODUCTCODE<\/pre>\n<p>Below is the updated master produced by running the above job script using SortCL. The values are the same that are produced in a Type 1 update.<\/p>\n\n<table id=\"tablepress-12\" class=\"tablepress tablepress-id-12\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">ProductCode<\/th><th class=\"column-2\">Cost<\/th><th class=\"column-3\">StartDate<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">C123<\/td><td class=\"column-2\">125.50<\/td><td class=\"column-3\">20110228<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2425.00<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">19.25<\/td><td class=\"column-3\">20110930<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">550.50<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n\t<td class=\"column-1\">M447<\/td><td class=\"column-2\">139.25<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-7 odd\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">101.75<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-12 from cache -->\n<p>The history file contains all previous records plus the new records from the update file.<\/p>\n\n<table id=\"tablepress-19\" class=\"tablepress tablepress-id-19\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">ProductCode<\/th><th class=\"column-2\">Cost<\/th><th class=\"column-3\">StartDate<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">C123<\/td><td class=\"column-2\">125.50<\/td><td class=\"column-3\">20110228<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2425.00<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">F112<\/td><td class=\"column-2\">2365.00<\/td><td class=\"column-3\">20120101<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">19.25<\/td><td class=\"column-3\">20110930<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n\t<td class=\"column-1\">G101<\/td><td class=\"column-2\">21.25<\/td><td class=\"column-3\">20110501<\/td>\n<\/tr>\n<tr class=\"row-7 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">550.50<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-8 even\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">450.50<\/td><td class=\"column-3\">20110430<\/td>\n<\/tr>\n<tr class=\"row-9 odd\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">425.25<\/td><td class=\"column-3\">20101001<\/td>\n<\/tr>\n<tr class=\"row-10 even\">\n\t<td class=\"column-1\">J245<\/td><td class=\"column-2\">385.25<\/td><td class=\"column-3\">20100215<\/td>\n<\/tr>\n<tr class=\"row-11 odd\">\n\t<td class=\"column-1\">M447<\/td><td class=\"column-2\">101.75<\/td><td class=\"column-3\">220120701<\/td>\n<\/tr>\n<tr class=\"row-12 even\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">101.75<\/td><td class=\"column-3\">20120701<\/td>\n<\/tr>\n<tr class=\"row-13 odd\">\n\t<td class=\"column-1\">S022<\/td><td class=\"column-2\">98.75<\/td><td class=\"column-3\">20110515<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-19 from cache -->\n","protected":false},"excerpt":{"rendered":"<p>Dimensional data that change slowly or unpredictably are captured in Slowly Changing Dimensions (SCD) analyses. In a data warehouse environment, a dimension table has a primary key that uniquely identifies each record and other pieces of information that are known as the dimensional data. All the update methods for the different SCD types are accomplished<\/p>\n<div><a class=\"btn-filled btn\" href=\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\" title=\"SCD Type 4\">Read More<\/a><\/div>\n","protected":false},"author":10,"featured_media":8701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[32,776,3],"tags":[922,328,101,927,924,925,546,789,926,921,928,87,68,923],"class_list":["post-8017","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-intelligence","category-etl","category-vldb-operations","tag-categorical-variable","tag-data-management","tag-data-warehouse","tag-dimensional-data","tag-filtering","tag-grouping","tag-iri-cosort","tag-iri-voracity","tag-labeling","tag-scd","tag-scripts","tag-slowly-changing-dimensions","tag-sortcl","tag-statistics"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.4 (Yoast SEO v23.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SCD Type 4 - IRI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SCD Type 4\" \/>\n<meta property=\"og:description\" content=\"Dimensional data that change slowly or unpredictably are captured in Slowly Changing Dimensions (SCD) analyses. In a data warehouse environment, a dimension table has a primary key that uniquely identifies each record and other pieces of information that are known as the dimensional data. All the update methods for the different SCD types are accomplishedRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\" \/>\n<meta property=\"og:site_name\" content=\"IRI\" \/>\n<meta property=\"article:published_time\" content=\"2015-05-25T15:13:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-20T17:12:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"525\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Susan Gegner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Susan Gegner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\"},\"author\":{\"name\":\"Susan Gegner\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/87be5da567628ab9396ca81170f36d63\"},\"headline\":\"SCD Type 4\",\"datePublished\":\"2015-05-25T15:13:11+00:00\",\"dateModified\":\"2024-05-20T17:12:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\"},\"wordCount\":549,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\",\"keywords\":[\"categorical variable\",\"data management\",\"data warehouse\",\"dimensional data\",\"filtering\",\"grouping\",\"IRI CoSort\",\"IRI Voracity\",\"labeling\",\"SCD\",\"scripts\",\"slowly changing dimensions\",\"SortCL\",\"statistics\"],\"articleSection\":[\"Business Intelligence (BI&#041;\",\"ETL\",\"VLDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\",\"url\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\",\"name\":\"SCD Type 4 - IRI\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\",\"datePublished\":\"2015-05-25T15:13:11+00:00\",\"dateModified\":\"2024-05-20T17:12:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png\",\"width\":525,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iri.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SCD Type 4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iri.com\/blog\/#website\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"name\":\"IRI\",\"description\":\"Total Data Management Blog\",\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iri.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\",\"name\":\"IRI\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"width\":750,\"height\":206,\"caption\":\"IRI\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/87be5da567628ab9396ca81170f36d63\",\"name\":\"Susan Gegner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2b1ca5592a65d44483351292cf1ae00a?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2b1ca5592a65d44483351292cf1ae00a?s=96&d=blank&r=g\",\"caption\":\"Susan Gegner\"},\"url\":\"https:\/\/www.iri.com\/blog\/author\/susang\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SCD Type 4 - IRI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/","og_locale":"en_US","og_type":"article","og_title":"SCD Type 4","og_description":"Dimensional data that change slowly or unpredictably are captured in Slowly Changing Dimensions (SCD) analyses. In a data warehouse environment, a dimension table has a primary key that uniquely identifies each record and other pieces of information that are known as the dimensional data. All the update methods for the different SCD types are accomplishedRead More","og_url":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/","og_site_name":"IRI","article_published_time":"2015-05-25T15:13:11+00:00","article_modified_time":"2024-05-20T17:12:08+00:00","og_image":[{"width":525,"height":450,"url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","type":"image\/png"}],"author":"Susan Gegner","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Susan Gegner","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#article","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/"},"author":{"name":"Susan Gegner","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/87be5da567628ab9396ca81170f36d63"},"headline":"SCD Type 4","datePublished":"2015-05-25T15:13:11+00:00","dateModified":"2024-05-20T17:12:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/"},"wordCount":549,"commentCount":0,"publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","keywords":["categorical variable","data management","data warehouse","dimensional data","filtering","grouping","IRI CoSort","IRI Voracity","labeling","SCD","scripts","slowly changing dimensions","SortCL","statistics"],"articleSection":["Business Intelligence (BI&#041;","ETL","VLDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/","url":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/","name":"SCD Type 4 - IRI","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage"},"image":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","datePublished":"2015-05-25T15:13:11+00:00","dateModified":"2024-05-20T17:12:08+00:00","breadcrumb":{"@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#primaryimage","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","width":525,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/www.iri.com\/blog\/vldb-operations\/scd-type-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iri.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SCD Type 4"}]},{"@type":"WebSite","@id":"https:\/\/www.iri.com\/blog\/#website","url":"https:\/\/www.iri.com\/blog\/","name":"IRI","description":"Total Data Management Blog","publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iri.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iri.com\/blog\/#organization","name":"IRI","url":"https:\/\/www.iri.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","width":750,"height":206,"caption":"IRI"},"image":{"@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/87be5da567628ab9396ca81170f36d63","name":"Susan Gegner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2b1ca5592a65d44483351292cf1ae00a?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2b1ca5592a65d44483351292cf1ae00a?s=96&d=blank&r=g","caption":"Susan Gegner"},"url":"https:\/\/www.iri.com\/blog\/author\/susang\/"}]}},"jetpack_featured_media_url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2015\/05\/image005-1.png","_links":{"self":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/8017"}],"collection":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/comments?post=8017"}],"version-history":[{"count":19,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/8017\/revisions"}],"predecessor-version":[{"id":17448,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/8017\/revisions\/17448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media\/8701"}],"wp:attachment":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media?parent=8017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/categories?post=8017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/tags?post=8017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}