I need a recommendation on how to approach a problem. I have a singular source table with a bunch of data in it, there are no keys besides a unique id for each row, just data.
In my Drupal system, I have a content type that represents one of these items. However, a few of the fields from the item I am now representing as taxonomy terms. This would be trivial if the source was already normalized, but alas. How would you go about translating the flat data into unique taxonomy terms and keeping the terms associate with the appropriate destination node?
Further details:
An entry in the source table contains: make, model, and price data. Make and model are strings and price is a decimal. In the destination there is an Item content type, which has the taxonomy vocabulary Vendor associated with it. The make-field in the source table needs to have the data translated into a Vendor term, and then that term associated with the created node. Also, the terms must be unique. So say there were a few entries in the source table with the make of "Dell". The first time it's encountered the term should be created and associated, but if it's encountered a second time, it shouldn't create another term but instead use the term with the same name and associated that term with the new node.
Comments
Comment #0.0
lpeabody commentedadded a use case
Comment #1
mikeryanIt seems like it should be fairly straight-forward:
And map the other fields normally.
Comment #2
lpeabody commentedI was hoping it was straight forward. So that won't create multiple terms with the name, say, "Volkswagen" if "Volkswagen" appears multiple times in the make field for the source table?
Comment #3
mikeryanNo, it links to the existing term if it finds one.
Comment #4
mikeryanComment #5.0
(not verified) commentedgrammar