{"action":"created","issue":{"url":"https://api.github.com/repos/jakob/TableTool/issues/48","repository_url":"https://api.github.com/repos/jakob/TableTool","labels_url":"https://api.github.com/repos/jakob/TableTool/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/jakob/TableTool/issues/48/comments","events_url":"https://api.github.com/repos/jakob/TableTool/issues/48/events","html_url":"https://github.com/jakob/TableTool/issues/48","id":281396631,"number":48,"title":"Add an option to ignore numeric values","user":{"login":"qwesda","id":384993,"avatar_url":"https://avatars1.githubusercontent.com/u/384993?v=4","gravatar_id":"","url":"https://api.github.com/users/qwesda","html_url":"https://github.com/qwesda","followers_url":"https://api.github.com/users/qwesda/followers","following_url":"https://api.github.com/users/qwesda/following{/other_user}","gists_url":"https://api.github.com/users/qwesda/gists{/gist_id}","starred_url":"https://api.github.com/users/qwesda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qwesda/subscriptions","organizations_url":"https://api.github.com/users/qwesda/orgs","repos_url":"https://api.github.com/users/qwesda/repos","events_url":"https://api.github.com/users/qwesda/events{/privacy}","received_events_url":"https://api.github.com/users/qwesda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-12-12T14:07:41Z","updated_at":"2018-04-16T03:32:16Z","closed_at":null,"author_association":"NONE","body":"An option to threat numeric values as just text would be helpful. It could be represented by offering a `none` option in the _decimal_ section of the footer bar.\r\nI came across this issue when I had to update a few line in a huge tab-separated file. The workflow should have been: \r\n- processed the few line in numbers\r\n- export to csv\r\n- open with TableTool\r\n- convert with appropriate settings\r\n\r\nSince I wanted to compare the original and the new file with a diff tool I had to go back and replace the decimal point in all numbers to an arbitrary character so that TableTool didn't interpret them as numbers. Then make the conversion and replace the placeholder character back to the decimal point. Otherwise TableTool was truncating the decimal values (removing trailing zeroes) and the diff would highlight the whole file."},"comment":{"url":"https://api.github.com/repos/jakob/TableTool/issues/comments/381470678","html_url":"https://github.com/jakob/TableTool/issues/48#issuecomment-381470678","issue_url":"https://api.github.com/repos/jakob/TableTool/issues/48","id":381470678,"user":{"login":"fulldecent","id":382183,"avatar_url":"https://avatars0.githubusercontent.com/u/382183?v=4","gravatar_id":"","url":"https://api.github.com/users/fulldecent","html_url":"https://github.com/fulldecent","followers_url":"https://api.github.com/users/fulldecent/followers","following_url":"https://api.github.com/users/fulldecent/following{/other_user}","gists_url":"https://api.github.com/users/fulldecent/gists{/gist_id}","starred_url":"https://api.github.com/users/fulldecent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulldecent/subscriptions","organizations_url":"https://api.github.com/users/fulldecent/orgs","repos_url":"https://api.github.com/users/fulldecent/repos","events_url":"https://api.github.com/users/fulldecent/events{/privacy}","received_events_url":"https://api.github.com/users/fulldecent/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T03:32:16Z","updated_at":"2018-04-16T03:32:16Z","author_association":"NONE","body":"Here is a test case to document the SQLite behavior in interpreting `\"00500\",002350`.\r\n\r\n# Test case\r\n\r\n```\r\ncat > test.csv <<EOF\r\ncol1,col2\r\n\"00500\",002350\r\nEOF\r\nsqlite3\r\nsqlite> .mode csv\r\nsqlite> .import test.csv test\r\nsqlite> .dump\r\nPRAGMA foreign_keys=OFF;\r\nBEGIN TRANSACTION;\r\nCREATE TABLE test(\r\n  \"col1\" TEXT,\r\n  \"col2\" TEXT\r\n);\r\nINSERT INTO test VALUES('00500','002350');\r\nCOMMIT;\r\nSELECT * FROM test;\r\n00500,002350\r\nsqlite> .exit\r\n```\r\n\r\n# Results\r\n\r\n* Input values with leading zeros are preserved\r\n* Output does not preserve unnecessary quotation marks\r\n\r\n# Discussion\r\n\r\nSQLite is the most deployed software in the world. It is probably safe to use their behavior. Or more stringently we might just preserve every input as is until it is necessary to convert (as you recommend).\r\n\r\nAnd, of course, it might be nice to implement SQLite as a backend for TableTool. But that is an entirely separate discussion."}}
{"actor":{"display_login":"fulldecent"}}