-
Notifications
You must be signed in to change notification settings - Fork 0
/
bulkloader.yaml
98 lines (80 loc) · 3.49 KB
/
bulkloader.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Autogenerated bulkloader.yaml file.
# At a minimum address the items marked with TODO:
# * Fill in connector and connector_options
# * Review the property_map.
# - Ensure the 'external_name' matches the name of your CSV column,
# XML tag, etc.
# - Check that __key__ property is what you want. Its value will become
# the key name on import, and on export the value will be the Key
# object. If you would like automatic key generation on import and
# omitting the key on export, you can remove the entire __key__
# property from the property map.
# If you have module(s) with your model classes, add them here. Also
# change the kind properties to model_class.
python_preamble:
- import: base64
- import: re
- import: google.appengine.ext.bulkload.transform
- import: google.appengine.ext.bulkload.bulkloader_wizard
- import: google.appengine.ext.db
- import: google.appengine.api.datastore
- import: google.appengine.api.users
transformers:
- kind: Trainer
connector: csv
property_map:
- property: __key__
external_name: key
export_transform: transform.key_id_or_name_as_string
- property: bio
external_name: bio
# Type: Text Stats: 3 properties of this type in this kind.
import_transform: db.Text
- property: created
external_name: created
# Type: Date/Time Stats: 3 properties of this type in this kind.
import_transform: transform.import_date_time('%Y-%m-%dT%H:%M:%S')
export_transform: transform.export_date_time('%Y-%m-%dT%H:%M:%S')
- property: created_by
external_name: created_by
# Type: User Stats: 3 properties of this type in this kind.
import_transform: transform.none_if_empty(users.User) # Assumes email address
- property: email
external_name: email
# Type: String Stats: 3 properties of this type in this kind.
- property: firstName
external_name: firstName
# Type: String Stats: 3 properties of this type in this kind.
- property: lastName
external_name: lastName
# Type: String Stats: 3 properties of this type in this kind.
- property: modified
external_name: modified
# Type: Date/Time Stats: 3 properties of this type in this kind.
import_transform: transform.import_date_time('%Y-%m-%dT%H:%M:%S')
export_transform: transform.export_date_time('%Y-%m-%dT%H:%M:%S')
- property: modified_by
external_name: modified_by
# Type: User Stats: 3 properties of this type in this kind.
import_transform: transform.none_if_empty(users.User) # Assumes email address
- property: schoolAddress1
external_name: schoolAddress1
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolAddress2
external_name: schoolAddress2
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolAddressCity
external_name: schoolAddressCity
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolAddressState
external_name: schoolAddressState
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolAddressZip
external_name: schoolAddressZip
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolDistrict
external_name: schoolDistrict
# Type: String Stats: 3 properties of this type in this kind.
- property: schoolName
external_name: schoolName
# Type: String Stats: 3 properties of this type in this kind.