title: how to populate "ID" field in appengine when using bulkloader?
body: <p><img src="https://i.stack.imgur.com/HItQ4.jpg" alt="datastore viewer"></p>
  
  <p><strong>Updated: see below</strong></p>
  
  <p>I have figured out how to get the Key Name field filled in for my dataset so that I have now reduced the write ops by 2 (down from 8).  But I still have this extra empty column "ID".  I have tried various configurations of the bulkloader.py, but I am unable to populate that column and hopefully reduce my write ops down further...</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>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: Word
    connector: csv 
  
    property_map:
      - property: __key__
        external_name: word
        export_transform: transform.key_id_or_name_as_string
  
      - property: ID
        external_name: ID  
        # How to configure this one to use up that silly empty column called "ID"?
  
      - property: otherlangs
        external_name: otherlangs
  </code></pre>
  
  <p>Here is the header of my csv file and some sample rows:</p>
  
  <pre><code>$ head allting.csv
  ID,word,otherlangs
  100,a,it|uno|
  200,aaltos,fi|aaltojen|
  300,aardvark,is|jarðsvín|nl|aardvarken|
  </code></pre>
  
  <p><strong>Update:
  Okay, well, I found out how to populate the "ID" column at the expense of the "Key Name" column...</strong></p>
  
  <p>I changed my bulkload.py to look like this:</p>
  
  <pre><code>transformers:
  
  - kind: Word
    connector: csv
    connector_options:
      encoding: utf-8
      columns: from_header
    property_map:
      - property: __key__
        external_name: id
        export_transform: transform.key_id_or_name_as_string
        import_transform: transform.create_foreign_key('id', key_is_id=True)
  
      - property: word·
        external_name: word·
  
      - property: otherlangs·
        external_name: otherlangs·
  </code></pre>
  
  <p>The csv file looks like this:</p>
  
  <pre><code>id,word,otherlangs
  100,a,it|uno|
  200,aaltos,fi|aaltojen|
  ...
  </code></pre>
  
  <p>And the output in the Datastore Viewer looks like this now:</p>
  
  <p><img src="https://i.stack.imgur.com/KI091.jpg" alt="datastore viewer as it looks now"></p>
  
  <p><strong><em>Still wondering if there's any way to populate the ID and the "Key Name" column
  and get the write ops down to 4?</em></strong></p>