# What is the recommended method to add a column to a replicated table recording when the data was synced by CData?

**URL:** <https://community.cdata.com/t/what-is-the-recommended-method-to-add-a-column-to-a-replicated-table-recording-when-the-data-was-synced-by-cdata/97>\
**Category:** CData Sync\
**Tags:** question\
**Created:** [March 24, 2023, 1:34pm UTC](https://community.cdata.com/t/what-is-the-recommended-method-to-add-a-column-to-a-replicated-table-recording-when-the-data-was-synced-by-cdata/97 "2023-03-24T13:34:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maha](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Maha](https://community.cdata.com/u/Maha)\
**Post date:** [March 24, 2023, 1:34pm UTC](https://community.cdata.com/t/what-is-the-recommended-method-to-add-a-column-to-a-replicated-table-recording-when-the-data-was-synced-by-cdata/97/1 "2023-03-24T13:34:10Z")

</div>

What is the recommended method to add a column to a replicated table recording when the data was synced by CData? Is there a built-in feature or a custom query?

---

<div class="post-metadata">

**Author:** ![Maha](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Maha](https://community.cdata.com/u/Maha)\
**Post date:** [March 24, 2023, 1:35pm UTC](https://community.cdata.com/t/what-is-the-recommended-method-to-add-a-column-to-a-replicated-table-recording-when-the-data-was-synced-by-cdata/97/2 "2023-03-24T13:35:51Z")

</div>

Using the **Pre-Job** event script, found under ‘Events’ in the Job settings, environment variables can be added to the job execution. The following example creates a currentTimeStamp variable with the current timestamp and pushes out the item with that value to the Job:

 ![e2d30946-ce26-44e4-836d-73f550613e56.jpg](https://us1.discourse-cdn.com/cdata/original/1X/a026f1d6d873f9a4fdb314886e97b02ce2b4a412.jpeg)

To reference the environment variable you create, surround the _env.attribute_ with curly&nbsp;braces {}.

 ![13ed4c4e-1d06-4fa4-81b3-5911d966d8f0.png](https://us1.discourse-cdn.com/cdata/original/2X/2/268262d5ac548d623d74e8c00ce244e056da9503.png)

For more information about Events, please see the following Sync documentation:&nbsp;[CData Sync - Events | 22.0.8481](https://cdn.cdata.com/help/ASH/sync/Events.html)
