set key with new bulkloader
I am converting a script to use the new bulkloader. (What was wrong with the original bulkloader? - I prefer writing Python to editing configuration files...)
Anyway, I want to prevent duplicates by assigning a combination of properties to the key. The docs say:
If you want to use or calculate a key from the import data, specify a key using the same syntax as the property ma开发者_如何学Cp; that is, external_name, import_template, and so on.
All the examples apply a transform to the current property. How do I instead use a combination of other properties?
Should be something like:
- property: __key__
external_name: key
import_transform: entity.first_name + entity.last_name
You can do this using the 'import_template' property (documented here) instead of 'import_transform':
- property: __key__
import_template: "%(first_name)s %(last_name)s"
精彩评论