title: How to override dynamoDB data using Glue job
body: <p>As I understand, Joob Bookmarks prevents the duplicated data. &quot;Enable&quot; updates the data based on the previous data, and &quot;disable&quot; process the entire dataset (does this mean it overrides it? I tried this, but the job took for too long and i'm not sure if it does what i think it does.)</p>
  <p>But what if I want to override the Dynamodb Table in the job? I've seen examples where the output data is in S3, but I'm not sure about the DynamoDB.</p>
  <p>For example I have a Glue job like this:</p>
  <pre><code>import sys
  from awsglue.transforms import *
  from awsglue.utils import getResolvedOptions
  from pyspark.context import SparkContext
  from awsglue.context import GlueContext
  from awsglue.job import Job
  
  args = getResolvedOptions(sys.argv, [&quot;JOB_NAME&quot;])
  sc = SparkContext()
  glueContext = GlueContext(sc)
  spark = glueContext.spark_session
  job = Job(glueContext)
  job.init(args[&quot;JOB_NAME&quot;], args)
  
  # Script generated for node Redshift Cluster
  RedshiftCluster_node1 = glueContext.create_dynamic_frame.from_catalog(
      database=&quot;tr_bbd&quot;,
      redshift_tmp_dir=args[&quot;TempDir&quot;],
      table_name=&quot;tr_bbd_vendor_info&quot;,
      transformation_ctx=&quot;RedshiftCluster_node1&quot;,
  )
  
  # Script generated for node ApplyMapping
  ApplyMapping_node2 = ApplyMapping.apply(
      frame=RedshiftCluster_node1,
      mappings=[
          (&quot;vendor_code&quot;, &quot;string&quot;, &quot;vendor_code&quot;, &quot;string&quot;),
          (&quot;vendor_group_id&quot;, &quot;int&quot;, &quot;vendor_group_id&quot;, &quot;int&quot;),
          (&quot;vendor_group_status_name&quot;, &quot;string&quot;, &quot;vendor_group_status_name&quot;, &quot;string&quot;)
      ],
      transformation_ctx=&quot;ApplyMapping_node2&quot;,
  )
  
  # Script generated for node DynamoDB bucket
  Datasink1 = glueContext.write_dynamic_frame_from_options(
      frame=ApplyMapping_node2,
      connection_type=&quot;dynamodb&quot;,
      connection_options={
          &quot;dynamodb.output.tableName&quot;: &quot;VENDOR_TABLE&quot;,
          &quot;dynamodb.throughput.write.percent&quot;: &quot;1.0&quot;
      }
  )
  job.commit()
  </code></pre>
  <p>Thank you.</p>