Importing data from another database/questions about AwareIm

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Importing data from another database/questions about AwareIm

Post by karima »

Hi,

I want to transfer data from an external db.
I followed the directions in hyperlink below but it doesn't work for me.

http://www.hiden.org/awareim/tips-n-tri ... r-database

The only thing that is different from the example hyperlink is my external db is MS SQL and my attribute names in both objects are the same.
I selected the primary key for the external table.

When I test my project, i start process, there's no problems but I have no records in BOexternal and in BODestination.

May be I made a mistake somewhere, can you help me understand why it doesn'work?

I have some other questions.

1. How can I create relationships between my business objects in Aware Im?

2. Can I use SQL Language to query a Dery Database?

3. Can I developp my own Java programs in Aware Im and if it's right how and where in Aware Im?

Thank you in advance for your help.

PS: I know my English is not perfect. I hope you understand me. :roll:
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Try using the Log Viewer to see the results of execution of your process (set the logging level to full).

1. This is done by selecting an object name for attribute type when defining an attribute.

2. You can define SQL queries for Aware IM objects using the SQL Form tab in the query editor.

3. You cannot develop Java programs in Aware IM, but you can use Java programs as plug-ins for Aware IM. Please see the Programmers Reference document for details.
Aware IM Support Team
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

I try to import a table which has less records than the first and it works well.
In my first table, i have 4000 records and it doesn't work.
So, does this solution for importing data works just with a table which have just few records?

Thank you for your help.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

karima,

Did you look at the logs when you tried to import 4,000?

Tom
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

When i installed aware im, i would like to use my SQL Server Database, so i enter my database settings and i receive this error message : Could not establish connection with the database BASD.
I don't understand because when i try to import table of this database in Aware IM, it works (but unfortunatly just for tables which have few records).

In Log File i have an internal error: Exceptionwhile executing executeEntityRuler Exception class= com.bas.basserver.executionengine.ExecutionException message Internal error

Please help me!
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

I use the trial version maybe it will help you.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

1. Are you currently using Derby as the Aware IM database, is this correct?

2. It is unlikely that the problem is caused by the number or records, but probably relates to copying a particular attribute. Try removing some attributes from your copying process to identify the one that causes the problem.

Also, consider the following two-rule process for copying records from an existing database table:

FIND ALL ExternalObject
CREATE InternalObject FOR EACH ExternalObject WITH InternalObject.Attr1 = ExternalObject.Attr1, InternalObject.Attr2 = ExternalObject.Attr2, ...

Note the use of comma between attribute assignments. This will improve performance by making all assignments in one step.
Aware IM Support Team
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

aware_support2 wrote:2. It is unlikely that the problem is caused by the number or records, but probably relates to copying a particular attribute. Try removing some attributes from your copying process to identify the one that causes the problem.
Indeed, severals attributes are problematic for the import of data. But attributes can be integer or string, so how can i solve this problem?
I thought it would be much easier, I am a little disappointed, but I'm always listening to your answers.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

karima,

Is it possible to provide details about the specific problems you are having. I am really curious.

Thanks!
Tom
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

I try to import data from another database (SQL Server)
I have a business object which calls Candidat with these attributes:

IDcabinet, Number
IDcandidat , Number
UserCrea, Plain Text
UserModif, Plain Text
VilleCandidat, Plain Text
adresse1, Plain Text
adresse2, Plain Text
anneeNaissance,Number
annonce,Number
code, Plain Text
cpCandidat, Plain Text
dateCrea, Timestamp
dateModif, Timestamp
diplome, Plain Text
faxCandidat, Plain Text
flag, Number
infosCandidat, Plain Text
maiCandidat, Plain Text
paysCandidat, Plain Text
portableCandidat, Plain Text
prenomCandidat, Plain Text
salaireA, Number
salaireS, Number
telephoneCandidat, Plain Text

I can just import this two attributes: nomCandidat, prenomCandidat. The others attributes cause an internal error. There is no explications in the log files. And also, one time i received this error: A lock could not be obtaines within the time requested. What does it mean?

I use the two-rule process given by aware im support in this topic.

The process is also too long, only 8000 records in 20 minutes!
greg
Posts: 124
Joined: Sat Apr 23, 2005 12:46 am

Post by greg »

karima

Installation of AwareIM on top of SQL Server is documented in the installation guide and have been done successfully by numerous people. You need to know the root user name and password. Another thing to check is the version of your SQL server and if the connection file Aware uses is compatible with your server version. Then you can use an existing database table in AwareIM, though with some restrictions. Or you can still export and then import a table within the same database. This should clear compatibility issues with derby.

greg
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

If you need to copy your data only once, consider doing it via a CSV file. Export data from your existing database table into a CSV file, change names in the header row to match your Aware IM attributes (see the User Guide for details) and then import the CSV file into Aware IM.
Aware IM Support Team
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

ok, i exported my existing database table into a csv file and and added in the header the name of my attributes.
I created a business objects which calls "Candidat"
I have a process which done this:

Code: Select all

IMPORT Candidat FROM 'C:/Documents and Settings/karima/Bureau/CSV/Candidat.csv'
When i start the process i have an operation error : " Invalid description of data colum Nom. It must start with candidat."

What's the problem?

Thank you for your help.
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

i found my mistake
karima
Posts: 27
Joined: Wed Nov 28, 2007 3:30 pm

Post by karima »

I have a lot of data in my csv files. This is my process:

Code: Select all

IMPORT Candidat FROM 'C:/Documents and Settings/karima/Bureau/CSV/Candidat.csv' in batches of 100
When i start this process, there is no problems: 15112 records has been processed.
However, when i search this new object, there is no items to display!

What does it means?
Post Reply