Create fixed width files in your data recipe using the SimpleFixedWidth model path.

Screenshots

Specifics

Create fixed width files using the simple fixed width model. To utilize this feature, add the Model SimpleFixedWidth path to the intended data recipe and include at least 2 instructions: AddModel Row.scala, SetValue Filename.scala. The default alignment output is right aligned. Left alignment can be achived by adding the Left function into the instruction (see below).

Samples

Path and instructions

./Model SimpleFixedWidth/
./Model SimpleFixedWidth/AddModel Row.scala
./Model SimpleFixedWidth/SetValue Filename.scala

AddModel Row.scala

SimpleFixedWidth(
  1 -> Left("R")
  8 -> Left(row.stringEmpty("Census","EEID")),
  15 -> Left(row.stringEmpty("Census","FIRST_NAME")),
  15 -> Left(row.stringEmpty("Census","LAST_NAME")),
  30 -> Left(row.stringEmpty("Census","ADDRESS_1")),
  15 -> Left(row.stringEmpty("Census","CITY")
)

For additional details and other instructions that Flatmap Model supports, please visit the Flatmap Model Recipe Card

Suggestions and Feedback

Please send an email to michael.zaucha@brainpowersoftware.com if you have additional questions or feedback on this page.