Page 1 of 1

Re: Metadata from Schema File

Posted: Fri Dec 17, 2010 7:34 am
by chulett
PavelD wrote:I would have expected that the Column Import stage will do a search by column name in the source file header, and if found, would correctly associate the corresponding values
Bad expectation, I'm afraid. This isn't a database table we're talking about, it is a sequential file where everything is handled as you noted - positionally. So the first column is the first column and it couldn't care less what you call it in the job since that's not part of the reading process.

Other than being notified about changes like this, not sure what to suggest. Perhaps a pre-check and adjustment of the schema file if the file changes? I'm sure others who have actually faced this issue will have suggestions.

Posted: Fri Dec 17, 2010 2:37 pm
by ray.wurlod
The name "sequential" stems from the fact that, when processing these files, you have to read past each byte to get to the next. Therefore you have to read the precise structure. You can reorder columns elsewhere in your job, for example using a Copy stage. (And even that doesn't necessarily mean that DataStage will use that order in buffers (virtual Data Sets) and elsewhere!)