# Reinsert a csv dump using telegraf input.file : how restore original time stamp?

**URL:** <https://community.influxdata.com/t/reinsert-a-csv-dump-using-telegraf-input-file-how-restore-original-time-stamp/26805>\
**Category:** Telegraf\
**Created:** [October 2, 2022, 4:54pm UTC](https://community.influxdata.com/t/reinsert-a-csv-dump-using-telegraf-input-file-how-restore-original-time-stamp/26805 "2022-10-02T16:54:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkwim](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jkwim/32/11128_2.png) [@jkwim](https://community.influxdata.com/u/jkwim)\
**Post date:** [October 2, 2022, 4:54pm UTC](https://community.influxdata.com/t/reinsert-a-csv-dump-using-telegraf-input-file-how-restore-original-time-stamp/26805/1 "2022-10-02T16:54:21Z")

</div>

I have a set of data dumped from influxDB in a CSV file.

I want to import the data back in to InfluxDB (after some modificaton to fields/tags) but would like to restore the original timestamp which is included in the CSV file.

I tried:

```auto
  csv_timestamp_column = "time"
  csv_timestamp_format = "unix_ns"

```

but the timestamp for new entry in the database does not match the timestamp in the CSV file.

Here is the row from the dump (with columns truncated for clarity):  
`yourdata,1663530473368058074,...,2022-09-19T01:17:53,Grafana`

```auto
2022-10-02T15:47:05Z D! [agent] Starting service inputs
> mydata,host=Grafana, .... ,Time="2022-09-19T01:17:53" 1663530473000000000
2022-10-02T15:47:10Z D! [agent] Stopping service inputs

```

Original Timestamp is 1663530473368058074 but telegraf output is 1663530473000000000

Can somebody explain to me why this could be happening please?

For my current application this lost of precision is acceptable since I get to see the original time stamp to hh:mm:ss precision getting restored.

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [October 3, 2022, 1:22pm UTC](https://community.influxdata.com/t/reinsert-a-csv-dump-using-telegraf-input-file-how-restore-original-time-stamp/26805/2 "2022-10-03T13:22:32Z")

</div>

> [@jkwim](#):
>
> Original Timestamp is 1663530473368058074 but telegraf output is 1663530473000000000
> 
> Can somebody explain to me why this could be happening please?

The default precision in telegraf is in seconds. You need to set the `precision` parameter in the agent config to `1ns` as well if you want nanosecond precision on your metrics. See the [config docs](https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#agent) for more.
