External Source Problem
Moderators: chulett, rschirm, roy
External Source Problem
HI,
I'm reading an XML file using External Source stage and my job is aborting by throwing below errors
External_Source_37,0: Source subproc: sh: /Land/XML/Test20100121.xml: cannot execute
.
External_Source_37,0: Filter status 32256;
filter process failed: 126;
import error at record 0.
External_Source_37,0: Import error at record 0.
I selected output properties in External Source file stage as
Source Method : Specific Programs(s)
Source Program = /Land/XML/Test20100121.xml
and in Format tab
I mentioned Record level ........ Final Delimeter = end
Please let me know If I'm doing any thing wrong.
Thanks,
Raju
I'm reading an XML file using External Source stage and my job is aborting by throwing below errors
External_Source_37,0: Source subproc: sh: /Land/XML/Test20100121.xml: cannot execute
.
External_Source_37,0: Filter status 32256;
filter process failed: 126;
import error at record 0.
External_Source_37,0: Import error at record 0.
I selected output properties in External Source file stage as
Source Method : Specific Programs(s)
Source Program = /Land/XML/Test20100121.xml
and in Format tab
I mentioned Record level ........ Final Delimeter = end
Please let me know If I'm doing any thing wrong.
Thanks,
Raju
somaraju
Hi,
The problem is due to I don't have execute permission on the file and the error was gone after I got execute permission. Now my new problem is with the syntax error at line2
xternal_Source_37,0: Source subproc: /Land/XML/Test20100121.xml: syntax error at line 2 : `newline or ;' unexpected
.
External_Source_37,0: Filter status 512;
filter process failed: 2;
import error at record 0.
My first line in XML file is
<?xml version="1.0" encoding="UTF-8"?>
Do I need to change any settings in my Format tab like Record level and Field defaults
Thanks,
Raju
The problem is due to I don't have execute permission on the file and the error was gone after I got execute permission. Now my new problem is with the syntax error at line2
xternal_Source_37,0: Source subproc: /Land/XML/Test20100121.xml: syntax error at line 2 : `newline or ;' unexpected
.
External_Source_37,0: Filter status 512;
filter process failed: 2;
import error at record 0.
My first line in XML file is
<?xml version="1.0" encoding="UTF-8"?>
Do I need to change any settings in my Format tab like Record level and Field defaults
Thanks,
Raju
somaraju
What are you trying to accomplish with the stage? You cannot simply put a file name there, it will treat it as a command or script that it thinks you want to run, hence your 'need' for execute permissions. Hint: you no need.
If you are trying to emulate examples posted here where the ES stage is used to pass in a full filename to a XML Input stage set to 'URL/Filepath' so it can process it, you need to do just that - pass in the name as a string. Typically you would be doing some form of an "ls" and passing in multiple names, however you could do something like this to pass in a single (known) name:
echo /Land/XML/Test20100121.xml
If you are trying to accomplish something else, please clarify that for us.
![Wink :wink:](./images/smilies/icon_wink.gif)
If you are trying to emulate examples posted here where the ES stage is used to pass in a full filename to a XML Input stage set to 'URL/Filepath' so it can process it, you need to do just that - pass in the name as a string. Typically you would be doing some form of an "ls" and passing in multiple names, however you could do something like this to pass in a single (known) name:
echo /Land/XML/Test20100121.xml
If you are trying to accomplish something else, please clarify that for us.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Chulett,
It's my bad. In External source I modified Source Method = Specific Programs and source Program = ls /Land/XML/Test20100121.xml | sort and column as XML_Data longVarchar no length and Nullable to No
In source program I provided the unix commands ls and sort
In format tab I mentioned Record Delimiter as Unix Newline
The job ran sucessfully but I got an warning and no records parsed through XML input stage and I'm getting 1 record from Exrternal Source stage and 0 records from XML input stage . See below warning
Parse_XML,0: Warning: Raj1.Parse_XML: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure
Thanks,
Raju
It's my bad. In External source I modified Source Method = Specific Programs and source Program = ls /Land/XML/Test20100121.xml | sort and column as XML_Data longVarchar no length and Nullable to No
In source program I provided the unix commands ls and sort
In format tab I mentioned Record Delimiter as Unix Newline
The job ran sucessfully but I got an warning and no records parsed through XML input stage and I'm getting 1 record from Exrternal Source stage and 0 records from XML input stage . See below warning
Parse_XML,0: Warning: Raj1.Parse_XML: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure
Thanks,
Raju
somaraju
So, are you trying to do what Ernie laid out here? If so, did you point the XML Input stage to the column coming in from the ES stage and set it to the 'URL/Filepath' option?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers