开发者

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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜