Hi,
I am reading multiple files from a location (*.txt). I want to get the name of the file to enter into database. I tried using auto_filling to capture the source_name but it fails.
Can you please let me know how to capture the filename?
Thanks
Nag
Attached code below:
<?xml version="1.0" encoding="UTF-8"?>
Hello,
you have duplicated delimiter after the last field. Your metadata should look like follows:
<Metadata id="Metadata4" previewAttachment="C:/eclipse_workspace/testinsert/data-in/data1${PROJECT}txt" previewAttachmentCharset="ISO-8859-1">
<Record fieldDelimiter="," name="recordName5" previewAttachmentCharset="ISO-8859-1" skipFirstLine="false" type="delimited">
<Field name="First_Name" size="50" type="string"/>
<Field name="Last_Name" size="50" type="string"/>
<Field delimiter="\n" name="Salary" size="10" type="number"/>
<Field auto_filling="source_name" delimiter="\r\n" eofAsDelimiter="true" name="filename" size="100" type="string"/>
</Record>
</Metadata>
Thanks for the reply.
I got rid of the duplicate metadata. It still did not work. I get red color on the salary field and all the values go blank.
When I moved the position of the new field (source_field, up and down in metadata editor), it started working.
Thanks
Nag