title: Set missing column values to a default using AWS Glue Jobs
body: <p>I'm trying to extract a dataset from dynamodb to s3 using Glue. In the process I want to select a handful of columns, then set a default value for any and all rows/columns that have missing values.</p>
  
  <p>My attempt is currently to use the "Map" function, but it doesn't seem to be calling my method.</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>def SetDefaults(rec):
      print("checking record")
      for col in rec:
          if not rec[col]:
              rec[col] = "missing"
      return rec
  
  ## Read raw(source) data from target DynamoDB 
  raw_data_dyf = glueContext.create_dynamic_frame_from_options("dynamodb", {"dynamodb.input.tableName" : my_dynamodb_table, "dynamodb.throughput.read.percent" : "0.50" } )
  
  ## Get the necessary columns  
  selected_data_dyf = ApplyMapping.apply(frame = raw_data_dyf, mappings = mappingList)
  
  ## get rid of null values
  mapped_dyF = Map.apply(frame=selected_data_dyf, f=SetDefaults)
  
  ## write it all out as a csv
  datasink = glueContext.write_dynamic_frame.from_options(frame=mapped_dyF , connection_type="s3", connection_options={ "path": my_train_data }, format="csv", format_options = {"writeHeader": False , "quoteChar": "-1" })
  </code></pre>
  
  <p>My <code>ApplyMapping.apply</code> call is doing the right thing, where <code>mappingList</code> is defined by a bunch of:</p>
  
  <pre><code>mappingList.append(('gsaid', 'bigint', 'gsaid', 'bigint'))
  mappingList.append(('objectid', 'bigint', 'objectid', 'bigint'))
  mappingList.append(('objecttype', 'bigint', 'objecttype', 'bigint'))
  </code></pre>
  
  <p>I have no errors, everything runs to completion. My data is all in s3, but there are many empty values still, rather than the "missing" entry I would like.</p>
  
  <p>The "checking record" print statement never prints out. What am I missing here?</p>