hoju
hoju

Reputation: 29452

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 map; 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

Upvotes: 0

Views: 335

Answers (1)

Nick Johnson
Nick Johnson

Reputation: 101149

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"

Upvotes: 1

Related Questions