Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: gmullinAre your field names consistent? If so enter them in the FieldNames parameter on the Optional tab, then add a Filter node directly after the Delimited node using "where execCount > 2" so you can skip the first 2 rows.
If your field names are not consistent you can use Input Raw to read the file, discard the first row and overwrite the file with a clean one. It will do the same as you manually opening the file and deleting the first row.
Sample file data, save this to a text file:
Remove this row
Col1,Col2,Col3
a,b,c
Sample graph with FileName graph parameter:
node:Input_Raw
bretype:lal1::Input Raw
editor:sortkey=5cb6492d2e9e7d32
output:@51ae0881326a4c48/=
prop:File={{^FileName^}}
editor:XY=200,260
end:Input_Raw
node:Discard_first_row
bretype:core::Filter
editor:Label=Discard first row
editor:sortkey=5cb649e4755d6614
input:@40fd2c74167f1ca2/=Input_Raw.51ae0881326a4c48
output:@40fd2c7420761db6/=
prop:Script=<<EOX
splitRaw = '_RawData'.split("\n")
i = 1
while i < splitRaw.len() {
if i == 1 then
newData = str(splitRaw[i])
else
newData = newData + "\n" + str(splitRaw[i])
i = i + 1
}
emit newData
EOX
editor:XY=310,260
end:Discard_first_row
node:Overwrite_file
bretype:lal1::Output Raw
editor:Label=Overwrite file
editor:sortkey=5cb64abf4f421de5
input:@5106ebc83f035045/=Discard_first_row.40fd2c7420761db6
output:@4ffae39e126d75ee/=
prop:DataField=newData
prop:File={{^FileName^}}
prop:FileExistsBehavior=Overwrite
prop:FileParamType=Literal
editor:XY=440,260
end:Overwrite_file
node:Delimited_File_3
bretype:core::Delimited File
editor:sortkey=5cb64b131adb762d
input:5cb64b130a164414/=Overwrite_file.4ffae39e126d75ee
output:@41e6c6cd11e613c6/=
prop:FieldDelimiter=,
prop:FilenameExpr=<<EOX
'_Filename'
EOX
prop:RecordDelimiter=\n
editor:XY=570,260
end:Delimited_File_3