Bootstrap data from Excel with foreign keys
Application Type
Traditional Web
Service Studio Version
11.10.9 (Build 38644)

These instructions were posted in another forum post on how to get around issue with bootstrapping data that contains Foreign keys. 

1. Add the missing IDs to Excel spreadsheet
2. Do the bootstrap normally, ignoring the platform will not have a match
3. In the structure created by the automatic bootstrap, add the (foreign key) fields that are missing. But add them as Integers instead of Entity Identifiers. Also, be sure the newly added attributes are in the same order as the columns in the excel, or you may get an error.
4. In the Bootstrap, select the Assignment node and add manually the missing (foreign key) fields, making the conversion from integer to identifier (if they are integers), or from text to identifier (if they are text).

I did all these things. My foreign keys are the last 3 fields in the file.  The first 3 fields come in fine, the foreign keys do not get imported at all.   This is a simple structure, 6 fields, with simple data to import, 10 records.  

Any help would be greatly apprecated. I have been over the bootstrap process, the assign, the structures and the IntegerToIdentity conversions numerous times.  I must be missing something simple here. 

I am in my personal environment publishing to the cloud personal world, not sure how to check the version there.  But that should be up to date, I would think.  

ManpowerCore.oml

Solution

I added a SQL query in the beginning of the bootstrap logic to delete all the existing records. At first that didn't work but once I got that executing properly the existing records were eliminated.  Then the bootstrap imports in the records from the Excel file and the foreign keys came in as expected (as Integers converted to Identity fields).  

Thank you so much for the sanity check and good thought on the duplicate/interfering records!

mvp_badge
MVP
Solution

Hi Lyle,

There seems not to be a problem, the data is correctly imported when I install the module on my PE. Could it be that you have some data in the table? In that case, your first split might cause the import to stop running.

Solution

I added a SQL query in the beginning of the bootstrap logic to delete all the existing records. At first that didn't work but once I got that executing properly the existing records were eliminated.  Then the bootstrap imports in the records from the Excel file and the foreign keys came in as expected (as Integers converted to Identity fields).  

Thank you so much for the sanity check and good thought on the duplicate/interfering records!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.