Export as fixed length?

Options
James Sidebotham
edited December 2023 in General

Hi, I want to export data that will be going to our mainframe. The data needs to be a fixed length format though, so fields will need to be padded with spaces for the whole column length. is there any easy way to do this before I start looking into building my own functions?

Thanks

Comments

  • James Sidebotham
    Options

    Well I ended up doing what I wanted with a mix of a function and some concat in a workflow. The function repeats a speace 100 times and appends to the column. Then I substring that for a length based on a parameter. In the workflow I build new columns based on the new function - these columns are all now fixed length (values padded right with spaces). Then on my output, i concat all the fields and export as test file, no delimiter.

    if there is an easier, would love to know - however, this turned out to be quite easy and successful

    thanks

  • Josh Boxer
    Josh Boxer Administrator
    Options

    Hi James great that you worked out a solution.

    There is a Function 'Pad' which will as it sounds append a value such as a space up to the desired length.

    https://docs.experianaperture.io/data-quality/aperture-data-studio-v2/get-started/create-functions/#nativefunctionsbycategory~native-functions

    Using the Function script editor along with the canvas can speed up doing the same thing multiple times, such as a concat

  • James Sidebotham
    Options

    Thanks Josh