{"action":"created","issue":{"url":"https://api.github.com/repos/eulerto/wal2json/issues/70","repository_url":"https://api.github.com/repos/eulerto/wal2json","labels_url":"https://api.github.com/repos/eulerto/wal2json/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/eulerto/wal2json/issues/70/comments","events_url":"https://api.github.com/repos/eulerto/wal2json/issues/70/events","html_url":"https://github.com/eulerto/wal2json/issues/70","id":342305321,"node_id":"MDU6SXNzdWUzNDIzMDUzMjE=","number":70,"title":"Add per-server-lifecycle unique number to each row","user":{"login":"OndraZizka","id":644904,"node_id":"MDQ6VXNlcjY0NDkwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/644904?v=4","gravatar_id":"","url":"https://api.github.com/users/OndraZizka","html_url":"https://github.com/OndraZizka","followers_url":"https://api.github.com/users/OndraZizka/followers","following_url":"https://api.github.com/users/OndraZizka/following{/other_user}","gists_url":"https://api.github.com/users/OndraZizka/gists{/gist_id}","starred_url":"https://api.github.com/users/OndraZizka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OndraZizka/subscriptions","organizations_url":"https://api.github.com/users/OndraZizka/orgs","repos_url":"https://api.github.com/users/OndraZizka/repos","events_url":"https://api.github.com/users/OndraZizka/events{/privacy}","received_events_url":"https://api.github.com/users/OndraZizka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-18T12:23:35Z","updated_at":"2018-07-18T15:40:27Z","closed_at":null,"author_association":"NONE","body":"Hi, we use wal2json to transfer incremental changes to an OLAP server (SnowFlake).\r\nIt's done in a batch after some period (nightly).\r\nDuring the day, one row may change several times.\r\nBy SnowFlake import, the file with change-per-row data is considered as a set, so the duplications may cause the earlier change override the former.\r\n\r\nTo solve that, a transaction timestamp could be used. But that needs enabling it in PostgreSQL server ([track_commit_timestamp = on](https://www.postgresql.org/docs/9.6/static/runtime-config-replication.html#GUC-TRACK-COMMIT-TIMESTAMP)) and has a performance impact.\r\n\r\nIt would be great if `wal2json` could keep an internal `int64` counter since the boot (or slot creation) and add a number to each line, an increment. Something like\r\n\r\n    {\"sn\":12340005, \"change\":[ ... }\r\n    {\"sn\":12340006, \"change\":[ ... }\r\n\r\nThanks for considering."},"comment":{"url":"https://api.github.com/repos/eulerto/wal2json/issues/comments/405976558","html_url":"https://github.com/eulerto/wal2json/issues/70#issuecomment-405976558","issue_url":"https://api.github.com/repos/eulerto/wal2json/issues/70","id":405976558,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTk3NjU1OA==","user":{"login":"OndraZizka","id":644904,"node_id":"MDQ6VXNlcjY0NDkwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/644904?v=4","gravatar_id":"","url":"https://api.github.com/users/OndraZizka","html_url":"https://github.com/OndraZizka","followers_url":"https://api.github.com/users/OndraZizka/followers","following_url":"https://api.github.com/users/OndraZizka/following{/other_user}","gists_url":"https://api.github.com/users/OndraZizka/gists{/gist_id}","starred_url":"https://api.github.com/users/OndraZizka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OndraZizka/subscriptions","organizations_url":"https://api.github.com/users/OndraZizka/orgs","repos_url":"https://api.github.com/users/OndraZizka/repos","events_url":"https://api.github.com/users/OndraZizka/events{/privacy}","received_events_url":"https://api.github.com/users/OndraZizka/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T15:40:27Z","updated_at":"2018-07-18T15:40:27Z","author_association":"NONE","body":"Good point. I assumed that `xid` can be the same for two changes in the same row. That's not correct?"}}
{"actor":{"display_login":"OndraZizka"}}