in ui/angular/src/app/measure/create-measure/pr/pr.component.ts [338:402]
submit(body: ProfilingStep4) {
this.step4 = body;
if (!this.formValidation(this.currentStep)) {
this.toasterService.pop(
"error",
"Error!",
"Please complete the form in this step before proceeding!"
);
return false;
}
this.newMeasure = {
name: this.step4.prName,
"measure.type": "griffin",
"dq.type": "PROFILING",
"rule.description": {
details: this.step4.noderule
},
"process.type": "BATCH",
owner: this.step4.owner,
description: this.step4.desc,
"data.sources": [
{
name: "source",
connector:
{
name: this.step1.srcname,
type: "HIVE",
version: "1.2",
"data.unit": this.step3.size,
"data.time.zone": this.step3.timezone,
config: {
database: this.step1.currentDB,
"table.name": this.step1.currentTable,
where: this.step3.config['where']
},
predicates: [
{
type: "file.exist",
config: {
"root.path": this.step1.srclocation,
path: this.step3.path
}
}
]
}
}
],
"evaluate.rule": {
"out.dataframe.name": "profiling",
rules: []
}
};
this.getGrouprule();
if (this.step3.size.indexOf("0") == 0) {
delete this.newMeasure["data.sources"][0]["connector"]["data.unit"];
}
if (!this.step3.needpath || this.step3.path == "") {
delete this.newMeasure["data.sources"][0]["connector"]["predicates"];
}
this.visible = true;
setTimeout(() => (this.visibleAnimate = true), 100);
}