I have exported my data from my production database and have created four files.
Clients.csv
Client_Contacts.csv
Client_Ref.csv (Automatically Generated by Export Command)
Client_Contact_refs.csv . (Automatically Generated by Export Command)
I am trying to import this data into a test server.
I run the import command and the Clients are imported and the Client_Contacts are imported.
Client_Contacts are a child of Clients and there can be multiple Client Contacts but the relationship does not seem to be created. I have also tried importing the ref files with no success.
Can anyone point me in the correct direction?
Thanks
Importing Data with Relationships
-
- Posts: 1473
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Importing Data with Relationships
If you don’t have any pm fields in your table you can just use sql to export the data rather than AIMEwanm wrote:I have exported my data from my production database and have created four files.
Clients.csv
Client_Contacts.csv
Client_Ref.csv (Automatically Generated by Export Command)
Client_Contact_refs.csv . (Automatically Generated by Export Command)
I am trying to import this data into a test server.
I run the import command and the Clients are imported and the Client_Contacts are imported.
Client_Contacts are a child of Clients and there can be multiple Client Contacts but the relationship does not seem to be created. I have also tried importing the ref files with no success.
Can anyone point me in the correct direction?
Thanks
Eg
ClientContact.obClients.clientNo, ClientContact.Attribute etc etc
Then you don’t need the ref files.
Re: Importing Data with Relationships
Thanks, I need to make the export/import feature available for some of my users later so I need to understand how to do this from within AIM.
You use the term 'pm', can you explain what this means?
Thanks
You use the term 'pm', can you explain what this means?
Thanks
-
- Posts: 1473
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Importing Data with Relationships
Peer multiple.
Eg
BOs
Person
Languages
A person can speak many languages
Person.pmLanguages
If you just use languages as a list within the person BO then AIM will generate a hidden table Person_ref to manage that many to many relationship.
Generally I try to avoid simple list attributes in a BO as I tend to need extra data like Date Added, Active, Added By
This reduces the number of _REF tables and consequently simplifies export tables.
I ended up avoiding the built in Export function as it made the export files to complicated for my 2D brain
Eg
BOs
Person
Languages
A person can speak many languages
Person.pmLanguages
If you just use languages as a list within the person BO then AIM will generate a hidden table Person_ref to manage that many to many relationship.
Generally I try to avoid simple list attributes in a BO as I tend to need extra data like Date Added, Active, Added By
This reduces the number of _REF tables and consequently simplifies export tables.
I ended up avoiding the built in Export function as it made the export files to complicated for my 2D brain