Hi,
I'd like to output a flat file with data that looks a little like this:
Is there a straighforward/natural way of doing this?
The input looks like this:
I'd like to output a flat file with data that looks a little like this:
COUNTRY TYPE MAKE
Japan Car Toyota
Mazda
Bike Honda
Yamaha
Germany Car Mercedes Benz
Audi
Volkswagen
Is there a straighforward/natural way of doing this?
The input looks like this:
COUNTRY TYPE MAKE
Japan Car Toyota
Japan Car Mazda
Japan Bike Honda
Japan Bike Yamaha
Germany Car Mercedes Benz
Germany Car Audi
Germany Car Volkswagen
-
Hi, mwgjordan,
I would use just Reformat with CTL code like the following:
Best regards,string country = "";
string type = "";
string make = "";
function integer transform() {
if (!isnull($in.0.COUNTRY)) {
country = $in.0.COUNTRY;
}
if (!isnull($in.0.TYPE)) {
type = $in.0.TYPE;
}
if (!isnull($in.0.MAKE)) {
make = $in.0.MAKE;
}
$out.0.COUNTRY = country;
$out.0.TYPE = type;
$out.0.MAKE = make;
return ALL;
}
Please sign in to leave a comment.
Comments 1