I don't know how to do this with pivot stage.
However, you could:
Use a sequential file stage with a delimeter that does not occur in the file. Maybe \xF8 Also, set Quote to none. Store this in one column. Example col1 varchar without any length.
Send col1 down a link to an external filter. Run this code in the filter.
Code: Select all
## AUTHOR: Ryan T. Putnam
awk 'BEGIN {FS=";"; OFS=";";}
{
START=0;
LEN=index(substr($2, START), "|");
START=START + LEN + 1;
if (( LEN == 0 ))
{
print $1,$2;
}
else
{
print $1,substr($2, 1, LEN -1);
while (LEN > 0)
{
LEN=index(substr($2, START), "|");
if (( LEN > 0 ))
{
print $1,substr($2, START, LEN -1);
}
else
{
print $1,substr($2, START);
}
START=START + LEN;
}
}
}'
Send the filtered results down a link to the column import. Create an output link to the destination. In the column import stage, set the delimeter to ";" and Quote to none. Also, create the columns in the output that you need based upon the assignment names.