{"action":"closed","issue":{"url":"https://api.github.com/repos/juttle/juttle/issues/159","repository_url":"https://api.github.com/repos/juttle/juttle","labels_url":"https://api.github.com/repos/juttle/juttle/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/juttle/juttle/issues/159/comments","events_url":"https://api.github.com/repos/juttle/juttle/issues/159/events","html_url":"https://github.com/juttle/juttle/issues/159","id":126305889,"number":159,"title":"read -timeField fieldx should delete fieldx","user":{"login":"demmer","id":3308504,"avatar_url":"https://avatars.githubusercontent.com/u/3308504?v=3","gravatar_id":"","url":"https://api.github.com/users/demmer","html_url":"https://github.com/demmer","followers_url":"https://api.github.com/users/demmer/followers","following_url":"https://api.github.com/users/demmer/following{/other_user}","gists_url":"https://api.github.com/users/demmer/gists{/gist_id}","starred_url":"https://api.github.com/users/demmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demmer/subscriptions","organizations_url":"https://api.github.com/users/demmer/orgs","repos_url":"https://api.github.com/users/demmer/repos","events_url":"https://api.github.com/users/demmer/events{/privacy}","received_events_url":"https://api.github.com/users/demmer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/juttle/juttle/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/juttle/juttle/labels/in%20progress","name":"in progress","color":"ffa500"}],"state":"closed","locked":false,"assignee":{"login":"rlgomes","id":107359,"avatar_url":"https://avatars.githubusercontent.com/u/107359?v=3","gravatar_id":"","url":"https://api.github.com/users/rlgomes","html_url":"https://github.com/rlgomes","followers_url":"https://api.github.com/users/rlgomes/followers","following_url":"https://api.github.com/users/rlgomes/following{/other_user}","gists_url":"https://api.github.com/users/rlgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/rlgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlgomes/subscriptions","organizations_url":"https://api.github.com/users/rlgomes/orgs","repos_url":"https://api.github.com/users/rlgomes/repos","events_url":"https://api.github.com/users/rlgomes/events{/privacy}","received_events_url":"https://api.github.com/users/rlgomes/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-01-12T23:49:32Z","updated_at":"2016-02-08T21:15:19Z","closed_at":"2016-02-08T21:15:19Z","body":"When the -timeField is used with read, the current behavior converts the specified field into a Juttle time and puts it into a field named `time`, but leaves the original field unmodified in the data points.\r\n\r\nFor example, given a file containing the following points:\r\n\r\n```\r\n[\r\n   {\r\n        \"i\": 1,\r\n        \"my_time\": \"2015-01-01\"\r\n    },\r\n    {\r\n        \"i\": 2,\r\n        \"my_time\": \"2015-01-02\"\r\n    },\r\n    {\r\n        \"i\": 3,\r\n        \"my_time\": \"2015-01-03\"\r\n    }\r\n]\r\n```\r\n\r\nRunning `read file -file <path> -timeField 'my_time' returns the following:\r\n\r\n```\r\n┌────────────────────────────────────┬──────────┬───────────────┐\r\n│ time                               │ i        │ my_time       │\r\n├────────────────────────────────────┼──────────┼───────────────┤\r\n│ 2015-01-01T00:00:00.000Z           │ 1        │ 2015-01-01    │\r\n├────────────────────────────────────┼──────────┼───────────────┤\r\n│ 2015-01-02T00:00:00.000Z           │ 2        │ 2015-01-02    │\r\n├────────────────────────────────────┼──────────┼───────────────┤\r\n│ 2015-01-03T00:00:00.000Z           │ 3        │ 2015-01-03    │\r\n└────────────────────────────────────┴──────────┴───────────────┘\r\n```\r\n\r\nIt seems better to remove the field `my_time` from the points since the value is now properly converted to a moment in the `time` field.\r\n\r\nBesides being somewhat tidier, the current solution will cause problems if we send the data to a timechart, since the series identification logic will interpret the extra field as a series key."}}