Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question reject logs

More
14 Mar 2017 17:24 #1 by Aurélie
reject logs was created by Aurélie
Hello,

We are doing a mapping with datas in .txt file to integrate in a SQL table.
We want to parameter rejects lines from this file.

When we use "Action Process REJECT" in the mapping, it logs correctly the rejects but in a new table (R_......) in our database.
We don't want to create a reject table in this database, but just log the rejected line in a file in stambia directory (stambia_work for example). How we can make it ?

In the file configuration > reading behaviour > we can select "trace error to bad file", where we can find this "bad file" ?

Thank you
More
14 Mar 2017 17:54 #2 by Thomas BLETON
Replied by Thomas BLETON on topic reject logs
Hi,
The "bad file" is generated in the same directory as the original file itself.
Can you find it ?
More
15 Mar 2017 09:32 #3 by Aurélie
Replied by Aurélie on topic reject logs
Hello,

Ok, The log.bad file is generated when we select in the properties of our file model :

Field format > abort + trace error to bad file

But if we select this, the entire file is rejected and not inserted in the database (and not only the "corrupted" line)

We want to integrate in our database all the lines except the "corrupted" line and log the error.

If we select : Field format > ignore error + trace error to bad file, the log.bad is not generated and the only way to see the rejected line is the reject table (R_....)

Is there a possibility in the mapping to do integrate the lines of the file, except the corrupted line, log the error, but without creating a reject table ?

Thanks a lot for your help
More
15 Mar 2017 15:02 - 15 Mar 2017 15:03 #4 by Thomas BLETON
Replied by Thomas BLETON on topic reject logs
When using "ignoreError", the line should be rejected into the .bad file and not loaded to the target. (ignoreError is like "do not raise an error for the whole file")
If you want Stambia to load this line into the target, you have to specify what should be done with invalid values :
- "setToEmptyValue" will replace them with '' (or NULL when dealing with number datatypes)
- "setToNull" will replace them with NULL

If you feel that something is not working properly with your file or metadata, please open a support ticket, they will look into it :)
Last edit: 15 Mar 2017 15:03 by Thomas BLETON.
More
16 Mar 2017 09:41 #5 by Aurélie
Replied by Aurélie on topic reject logs
We did several tests and when using "ignore error" with rejects and the bad file is not generated (this bad file only appears when we select "abort"). If necessary we will raise a ticket.

For the second point, we don't want to load this line, this line should be rejected.
So, what we did is load this line in a reject table (but in another shema of our database)

Another thing, this file that we want to load in our database has only numeric datas.
To test the rejects, we put on a line letters instead of numbers.
In the rejected table the line appear properly but instead of the letters in the field "null" appear and before we had to enable "reject null value" in our mapping in each field otherwise the line was not rejected :/ We hope this will be corrected in the next version of Stambia
More
16 Mar 2017 11:50 #6 by Thomas BLETON
Replied by Thomas BLETON on topic reject logs
With "ignoreError", the line should be rejected and not loaded.
By the way: your mapping must use a FileDriver based template (not a Bulk / Loader template), so that the "Reading Behavior" can be applied.

At this point we cannot confirm there is a bug or a metadata/template configuration issue.
Please open a support ticket. Join an "Export models and dependencies" of your mapping, and a sample file to reproduce.
Thank you :)