trouble with import

If you think that something doesn't work in Aware IM post your message here
Post Reply
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

trouble with import

Post by Hubertus »

I should update a BO with data coming from a M$SQL using a csv file.
The updates seem to work fine, but no records are added. I emptied the table in MySQL and tried again but every non existing ID produces

Code: Select all

Business object with ID 4not found in row 1 and column 1. Ignoring data for the object
The Import happens from a rule with

Code: Select all

IMPORT Kunde FROM SystemSettings.ImportDateiKunden IN BATCHES OF 10
The csv file contains about 2000 records starting with

Code: Select all

"Kunde.ID","Kunde.MatchCode","Kunde.Firma","Kunde.FirmaZusatz","Kunde.Anschrift","Kunde.PLZ","Kunde.Ort","Kunde.Land","Kunde.Bemerkung"

4,"Wollinger LA","Wollinger Graz",,,"8010","Graz","AT","LP100 1:1 !!!!"

I'm using build 882

Any idea on what's going wrong here ?

Thanks a lot
Hubertus
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

ok I found in another thread that I can't use the ID for updating .
So I added a field KHKID in my BO and changed the header to start with

Code: Select all

"Kunde.KHKID"
which worked fine.

But using

Code: Select all

"*Kunde.KHKID"
correctly updates the records but doesn't add new ones.
Is this a bug or a feature ?
In case this is a feature could you please tell me how I can update AND create records ?
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

another question:
would there be any side effects if I update the database directly ?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

You cannot create and update records from the same CSV file. You need to split it in two files - one for creating records and one for updating records.

The "*" notation is used to identify a primary key of the record to be updated in situations when the native Aware IM primary key attribute (ID) is not known. Therefore this notation should only be used to update records.

Yes, you can update the database directly if you know what you are doing and if you do not want to execute rules - therefore, since you are bypassing rules, you have to make sure that the data you modify stays consistent.
Aware IM Support Team
Post Reply