dataform-co / dataform-scd Goto Github PK
View Code? Open in Web Editor NEWCommon data models for creating type-2 slowly changing dimensions tables from mutable data sources in Dataform.
Home Page: https://dataform.co
License: MIT License
Common data models for creating type-2 slowly changing dimensions tables from mutable data sources in Dataform.
Home Page: https://dataform.co
License: MIT License
The SCD library doesn't seems working on handling new rows (insertion).
For example:
Existing source table has rows with id : 1,2,3
After initial Dataform run
The table_scd_updates has rows with id : 1,2,3
When there is a new row in the source table : 1,2,3,4
The current logic doesn't handle the new row (id 4).
File code : dataform-scd/index.js
Code line :
"// Create an incremental table with just pure updates, for a full history of the table."
...
"where ${timestamp} > (select max(${timestamp}) from ${ctx.self()})
"
The above logic will only insert new row when the id already exists from the initial SCD creation.
Is it intentional or bug?
How if adding additional clause e.g
"where ${timestamp} > (select max(${timestamp}) from ${ctx.self()})
"
OR ${uniqueKey} NOT IN (select distinct ${uniqueKey} from ${ctx.self()}))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.