Guest User

Untitled

a guest
Feb 18th, 2020
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. test_admin@automation-test:~$ python3 pipeline.py --start_dt='2019-09-24 18:00:00' --end_dt='2019-09-24 19:00:00'
  2. age_segment event item_id item_topic item_type source_id \
  3. event_id
  4. 2931262 18-25 show 1793260 Красота native 8388799
  5. 2931277 18-25 show 7465641 Культура native 5837959
  6. 2931285 18-25 show 406073 История url 2335872
  7. 2931247 26-30 show 752665 Путешествия native 6963489
  8. 2931278 26-30 click 6843081 Юмор url 5427748
  9.  
  10. source_topic source_type dt user_id
  11. event_id
  12. 2931262 История publisher 2019-09-24 18:27:37 2185026
  13. 2931277 История publisher 2019-09-24 18:27:37 6845238
  14. 2931285 Сад и дача domain 2019-09-24 18:27:38 5244363
  15. 2931247 Здоровье publisher 2019-09-24 18:27:37 7553074
  16. 2931278 Семейные отношения domain 2019-09-24 18:27:38 1317585
  17. visits
  18. item_topic source_topic age_segment dt
  19. Деньги Авто 18-25 2019-09-24 18:32:00 3
  20. 2019-09-24 18:35:00 1
  21. 2019-09-24 18:54:00 4
  22. 2019-09-24 18:55:00 17
  23. 2019-09-24 18:56:00 27
  24. unique_users
  25. dt item_topic event age_segment
  26. 2019-09-24 18:28:00 Деньги click 18-25 1
  27. 31-35 1
  28. 36-40 1
  29. show 18-25 13
  30. 26-30 1
  31. test_admin@automation-test:~$ sudo su postgres
  32. postgres@automation-test:/home/test_admin$ psql
  33. psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))
  34. Type "help" for help.
  35.  
  36. postgres=# \c zen
  37. You are now connected to database "zen" as user "postgres".
  38. zen=# \dt
  39. List of relations
  40. Schema | Name | Type | Owner
  41. --------+-----------------+-------+----------
  42. public | dash_engagement | table | postgres
  43. public | dash_visits | table | postgres
  44. public | log_raw | table | postgres
  45. (3 rows)
  46.  
  47. zen=# SELECT * FROM dash_visits;
  48. record_id | item_topic | source_topic | age_segment | dt | visits
  49. -----------+------------+--------------+-------------+----+--------
  50. 1 | | | | | 3
  51. 2 | | | | | 1
  52. 3 | | | | | 4
  53. 4 | | | | | 17
  54. 5 | | | | | 27
  55. 6 | | | | | 22
  56. 7 | | | | | 24
  57. 8 | | | | | 20
  58. 9 | | | | | 5
  59. 10 | | | | | 1
  60. 11 | | | | | 1
  61. 12 | | | | | 1
  62. 13 | | | | | 1
  63. 14 | | | | | 4
  64. 15 | | | | | 13
  65. 16 | | | | | 18
  66. 17 | | | | | 15
  67. 18 | | | | | 13
  68. 19 | | | | | 13
  69. 20 | | | | | 5
  70. 21 | | | | | 1
  71.  
  72. zen=# SELECT * FROM dash_engagement;
  73. record_id | dt | item_topic | event | age_segment | unique_users
  74. -----------+----+------------+-------+-------------+--------------
  75. 1 | | | | | 1
  76. 2 | | | | | 1
  77. 3 | | | | | 1
  78. 4 | | | | | 13
  79. 5 | | | | | 1
  80. 6 | | | | | 1
  81. 7 | | | | | 4
  82. 8 | | | | | 2
  83. 9 | | | | | 2
  84. 10 | | | | | 2
  85. 11 | | | | | 13
  86. 12 | | | | | 9
  87. 13 | | | | | 1
  88. 14 | | | | | 3
  89. 15 | | | | | 1
  90. 16 | | | | | 1
  91. 17 | | | | | 1
  92. 18 | | | | | 4
  93. 19 | | | | | 3
  94. 20 | | | | | 6
  95. 21 | | | | | 1
RAW Paste Data