rh-marketingops / dwm Goto Github PK
View Code? Open in Web Editor NEWRed Hat's business logic for maintaining marketing data quality
License: GNU General Public License v3.0
Red Hat's business logic for maintaining marketing data quality
License: GNU General Public License v3.0
UDFs should be defined and executed as extensions of a base UDF class:
from dwm import UDF
class MyUDF(UDF):
udf_name = 'publicly-visible name'
udf_docs = 'publicly-visible docs'
def run(self, data, hist):
...
Currently, the DWM config dictionary is passed down to each sub-function, as is the MongoDB config.
We need to refactor this to have a top-level DWM object which is configured once, and all subsequent calls reference.
Example:
from dwm import DwmInstance
DWM = DwmInstance()
DWM.set_mongo('mongo_connection_string')
DWM.set_config({...}) # pass in dictionary with config object
INPUT = {...} # input record for cleaning
OUTPUT, HISTORY = DWM.clean(INPUT)
We should be able to preserve most, if not all, of the low-level functions used in DWM already; this would just replace how we interact with it.
Option to skip deriving value on a field if existing value in picklist of acceptable values.
Currently loop through config.derive
settings breaks only when the actual input field value is changed, which leads to inconsistent behavior. Need to instead return a boolean flag from the child functions which would break the loop.
Currently, running dwmOne
results in the contactHistory record being auto-added to MongoDB. To make this package more scalable as a microservice, we need to return the history record separately.
Example:
INPUT = {...} # single record to clean
OUTPUT, HISTORY = dwmOne(INPUT, ...)
This update should include removing _current
, timestamp
, and the key identifier from history record.
Add option for derive
logic to skip if the value is already valid and/or clear any non-valid values.
When records are added to contactHistory
, include custom metadata for better database cleanup/management.
{
"IdentifierKey": "12345",
"metadata": {
"batchId": "abcde",
"batchTimestamp": timestamp
},
...
Following the major refactor for v0.1.0, make the low-level functions match the patterns established in the high-level wrappers
In Readme.md there is a small typo. Should it be Usage instead of Useage?
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.