Cross Join - Updated July 2015

Background: 

The cross join script will take two files that do not have a common key and creates a new file containing all records from both files. - The menu has been updated.

July 2015 - I have rewritten the interface, probably not much of a difference for the user but the backend should work better and the dialog won't close each time you make a selection.  It will also work for time fields.  It currently ignores virtual and boolean fields, they won't be copied over to the new file.

Documentation: 

Cross Join Script

The cross join script will take two files that do not have a common key and create a new file containing all records from both files.

The script will take all the records from the secondary file and join them to teach record of the primary file.

It is easier to understand through this easy example.  If the following is our primary file, we have 3 records with 2 fields.

The secondary file has 4 records with 3 fields. 

Using the cross join we will join each record in the secondary file to each record in the primary file.  The new file would have 12 records, 3 (primary file) x 4 (secondary file)

You can see each field has been copied and that each record from the secondary file has now been joined to each individual record in the primary file.

The cross join script uses the following menu:

You must select the primary and secondary database much in the same was as using the join function within IDEA.  Clicking on the Select button will give you a list of all the IDEA files in the current working directory.  You cannot select the same database, that is you cannot join the same database to itself.

The menu will also give you the number of records that will be created in the new file.  As the script joins each secondary record to each primary record the file size can become quite large.  A primary file with 1,000 records joined to a secondary file with 10,000 records would give a final file of 10,000,000 records!!!

The filename is the name of the IDEA file that will be created.

You have the option to select the fields that you wish to include in the final result. 

The default is all fields will be included but the menu allows you to deselect different fileds.  At least one field needs to be selected.

Document PDF: