Is there a way to divide the columns in a data sheet over several Data Properties of different Data Items?
I have a large Excel sheet with all kinds of data. The data in the Excel sheet have some relations between columns. So I made a normalised data model with several Data Items and their connections. I am able to import the full excel sheet, but I would like to put several columns from the Excel sheet as Data Properties in different Data Items. Is there a way to import them directly into these Data Properties? Or do I import the full Excel sheet and then put the data into the different Data Properties? And how would I do that?
Thanks!
2 Likes
Hi again,
The way Triggre works with Excel sheets is that each worksheet represents a data-item. It is possible to import an Excel file with multiple datasheets at once. Simply redistribute your columns from the one datasheet to different datasheets that have been named after the data-items you have created in your normalized model. Move or copy each column in the right datasheet, according to your datamodel in Triggre.
For example:
Say you have a datasheet named âCustomersâ containing personal and address info and you want to store the personal data in a data-item Person and the Address in a related data-item Address. You create two additional datasheets, named âPersonâ and âAddressâ respectively.
Then select all columns containing the data you want to store in Person and move them to the âPersonâ datasheet. You do the same with the columns containing the Address data and move those to âAddressâ. Of course you could also re-use the âCustomersâ datasheet by renaming it to âPersonâ and only move the Address data to a new sheet. Whatever works best for you.
Now you need to create a relation between the two sheets, to tell Triggre how to reference them. You do this by using a unique property in Person to point to from Address. This can be any property, as long as it is unique. In this example we use the property Name as the ID for the Person. In you data-item Address you have created a reference property with the name âofPersonâ. In your âAddressâ datasheet, add a column with the name ofPerson_Name. In your âPersonâ datasheet you add the extension â[ID]â to the columnheader Name, thus naming it Name[ID].
This way, Triggre wil import the âPersonâ sheet first, leaving the reference to Address empty. Then it will import the âAddressâ sheet, creating a reference between the created Address and the already present Person by using Name as an identifier. This will also set the reverse reference in Person.
However, depending on the number of datasheets you end up with this is a complex way of importing, and there are some things you need to consider when doing this:
- When importing, Triggre can only handle references to records that already have been imported. So in our example you place the âPersonâ sheet before the âAddressâ sheet. Otherwise Triggre wil produce an error because the referenced value couldnât be found. When using more datasheets, use the right order to import them to prevent these errors.
- Make sure that all data-items have a unique ID column (when using âduplicates not allowedâ). If they donât, add one and fill it. Note that the ID column also needs to exist in the data-item in Triggre!
- If you are copying columns from your âmasterâ datasheet into the datasheets you want to import, make sure to delete the âmasterâ sheet before importing. Also make sure to transform all formulas in your datasheets into values before removing the âmasterâ sheet to prevent unexpected errors in your data. If you are re-using your âmasterâ sheet as one of the data-item imports, this of course is not necessary.
- You do not have to use all your defined properties in the datasheet, however the columns you do use must have a name that refers to a property in your datamodel.
Important: The example and these remarks apply to importing data using âduplicates not allowedâ.
Hope this helps!
3 Likes
Wow! That looks like a lot but not too complicated. I am going to build a test set to try to make this work! Once again, thanks a lot for your quick answer!
3 Likes