# Delete \_field for measurement

**URL:** <https://community.influxdata.com/t/delete-field-for-measurement/28022>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [January 6, 2023, 8:54am UTC](https://community.influxdata.com/t/delete-field-for-measurement/28022 "2023-01-06T08:54:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Boudigues](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/kevin_boudigues/32/11772_2.png) [@Kevin\_Boudigues](https://community.influxdata.com/u/Kevin_Boudigues)\
**Post date:** [January 6, 2023, 8:54am UTC](https://community.influxdata.com/t/delete-field-for-measurement/28022/1 "2023-01-06T08:54:29Z")

</div>

Hello,  
I have following configuration in my influxDB account :

I have 4 bucket which are bucket\_A, bucket\_B, bucket\_C and bucket\_D.  
In my bucket\_A, i have 3 \_measurements which are measure\_A, measure\_B and measure\_C.  
In my measure\_A, i have 5 \_field : name, age, email, address, number

I want to delete \_field “name” in measure\_A in bucket\_A.  
I didn’t understand influxDB documententation about the command i need to enter in my script editor in influxdata.

Could you help me please ? I work with influxDB 2.0

---

<div class="post-metadata">

**Author:** ![Jay\_Clifford](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jay_clifford/32/8287_2.png) [@Jay\_Clifford](https://community.influxdata.com/u/Jay_Clifford)\
**Post date:** [January 6, 2023, 11:27am UTC](https://community.influxdata.com/t/delete-field-for-measurement/28022/2 "2023-01-06T11:27:26Z")

</div>

Hi @Kevin_Boudigues,  
Deletions like this is sadly not something you can achieve via the script editor. It is an API only feature and does not allow you to get this granular with your deletion:  
[Delete data | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/write-data/delete-data/#:~:text=Delete%20data%20using%20the%20influx%20CLI,-Use%20InfluxDB%20CLI&text=Use%20the%20influx%20delete%20command,Use%20RFC3339%20timestamps).  
You would be deleting points rather than dropping a column like you are expecting.

Another route you could take is by writing your dataset to a new bucket and dropping the name column before hand:

```auto
 from(bucket: "plantbuddy")
    |> range(start: -30d)
    |> filter(fn: (r) => r._measurement == "sensor_data")
  |> drop(columns: ["name"])    
  |> to(bucket: "new_bucket")

```

It also looks like your data in this bucket might be better off in a reletional database. You could store it there and join your reletional data and time series data during query time with the SQL packages:

> **[sql.from() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/sql/from/)**
>
> sql.from() retrieves data from a SQL data source.
