SCD type 2 in Abinito | metadata port configuration | dml port configuration using metaprogramming




SCD-type 2 (Abinitio) - a follow up session


a.dml
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end

port0 = $AI_DML/a.dml =in0_metadata
port1 = $AI_DML/a.dml =in1_metadata

pdl1=$[add_field("record\nend","new",read_type("$AI_DML/a.dml"))]
in0_metadata
record
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end new;
end


pdl2=$[add_field("record\nend","old",read_type("$AI_DML/a.dml"))]
in1_metadata
record
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end old;
end

$[join_types(in0_metadata,in1_metadata)]

record
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end new;
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end old;
end
=====2==============

$[add_field(add_field("record\nend","new",read_type("$AI_DML/a.dml")),"old",read_type("$AI_DML/a.dml"))]

record
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end new;
record
string("#") id;
string("#") id;
date("YYYY-MM-DD")("\n") id;
end old;
end

Comments

Popular posts from this blog

Abinitio Interview Question # 1 - Write Multiple Files in Abinitio

Next In Sequence in ABinitio | How next_in_sequence() works in MFS