I have the following code in bulkloader.yaml:
- property: dismissal_date
external_name: dismissal_date
import_transform: "lambda x: None if x is None or x=='' else datetime.datetime.strptime(x, '%d.%m.%Y').date()"
models.py:
class Employee(ndb.Model):
dismissal_date = ndb.DateTimeProperty()
and upload file (csv):
last_name,first_name,middle_name,region,dismissal_date
Last name,First name,Middle name,22,13.01.2009
But I am getting the following error:
BadValueError: Unsupported type for property dismissal_date: <type 'datetime.date'>