{"id":408838,"date":"2024-06-29T20:24:46","date_gmt":"2024-06-29T20:24:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=408838"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=408838","title":{"rendered":"<span>\u0427\u0442\u043e, \u0433\u0434\u0435, \u043e\u0442\u043a\u0443\u0434\u0430: \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438\u0437 JSON<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/155\/7d8\/833\/1557d8833842c473e0e0f16682d7dc93.png\" width=\"1280\" height=\"728\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/155\/7d8\/833\/1557d8833842c473e0e0f16682d7dc93.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442\u00a0\u0416\u0435\u0440\u043e\u043d\u043a\u0438\u043d \u0410\u043d\u0442\u043e\u043d, \u044f Data Engineer<strong> <\/strong>\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a <a href=\"https:\/\/newtechaudit.ru\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA.<\/a>  <\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u0442\u0430\u2011\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/01d\/4ba\/8c2\/01d4ba8c26d628778ec666e0a438453c.png\" width=\"948\" height=\"947\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01d\/4ba\/8c2\/01d4ba8c26d628778ec666e0a438453c.png\"\/><\/figure>\n<p>\u0418 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0447\u0435\u043c\u0443: \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u00a0\u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.aminer.org\/citation\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u0442\u0430\u0441\u0435\u0442<\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0437\u00a0\u0441\u0435\u0431\u044f \u043e\u043a\u043e\u043b\u043e 5\u00a0\u043c\u043b\u043d. \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043d\u0438\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 (\u0430\u0432\u0442\u043e\u0440\u044b, \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430, \u0438\u00a0\u0442.\u00a0\u0434.). <\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e\u00a0\u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u00a0PostgreSQL. \u041f\u0440\u0438\u00a0\u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u00a0\u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u0410\u0432\u0442\u043e\u0440\u00bb, \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u00bb, \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e\u00bb. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u00a0MongoDB, \u0432\u0435\u0434\u044c \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0421\u0423\u0411\u0414 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043d\u043e\u00a0\u0432\u00a0\u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043d\u0435\u0439. <\/p>\n<p>\u0414\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043e\u0434\u043d\u043e\u0433\u043e JSON\u2011\u0444\u0430\u0439\u043b\u0430. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0437\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438\u00a0\u2014 \u0441\u00a0\u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/78c\/530\/c96\/78c530c96cbfec3840406556459921cd.png\" width=\"1404\" height=\"808\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/78c\/530\/c96\/78c530c96cbfec3840406556459921cd.png\"\/><\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f? \u0423\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0438 \u043e\u043d\u0430, \u043d\u0430\u00a0\u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439\u00a0\u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0432\u0438\u0434. \u041f\u0440\u0438\u00a0\u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u00a0\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u0432\u0438\u0434, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440 \u0438\u0445 ID. \u0422\u0430\u043a \u0434\u0443\u043c\u0430\u043b \u0438 \u044f, \u0440\u0435\u0448\u0438\u0432, \u0447\u0442\u043e\u00a0\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u00a0\u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0441\u00a0\u0447\u0435\u043c \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f\u00a0\u2014 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 (17\u00a0\u0413\u0411) \u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 (\u043d\u0430\u0440\u0443\u0448\u0435\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u043a\u043e\u0431\u043e\u043a) JSON\u2011\u0437\u0430\u043f\u0438\u0441\u0438. <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435\u00a0\u2014 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0441\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0421\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435\u00a0\u2014 \u044d\u0442\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u00a0\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0447\u0451\u0442\u043a\u043e \u0438 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a\u00a0\u0432\u00a0\u0442\u0435\u0445\u00a0\u0436\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0421\u0423\u0411\u0414. \u0412\u00a0\u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445, \u0430\u00a0\u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430\u00a0\u2014\u00a0\u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f\u00a0\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438\u0437\u00a0\u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437.\u00a0\u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u00a0pandas \u0441\u00a0\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u043f\u043e\u00a0\u0433\u0440\u0443\u043f\u043f\u0430\u043c \u0441\u0442\u0440\u043e\u043a (\u0447\u0430\u043d\u043a\u0430\u043c), \u0442.\u043a.:<\/p>\n<ul>\n<li>\n<p>\u0421\u044b\u0440\u043e\u0439 JSON\u2011\u0444\u0430\u0439\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 17\u00a0\u0413\u0411 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043d\u0435\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u043a\u00a0\u0432\u00a0\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0442\u0430\u043a \u0438 \u0432\u00a0\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 json. \u0412\u00a0pandas \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f.\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 chunksize \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u044f\u0441\u043d\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043a\u0430\u043a\u00a0\u043e\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u00a0JSON, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0432\u00a0\u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435. Pandas \u0445\u043e\u0442\u044f\u00a0\u0431\u044b \u043d\u0430\u00a0\u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439.<\/p>\n<p>\u041a\u0430\u043a\u00a0\u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0430\u0432\u0442\u043e\u0440\u044b, \u0438\u0437\u0434\u0430\u043d\u0438\u044f), \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u044b \u043d\u0435\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430\u00a0\u2014 \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f\u00a0\u2014 \u043e\u0434\u0438\u043d \u0430\u0432\u0442\u043e\u0440), \u0430\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d5e\/b04\/c80\/d5eb04c80cff104d03bc7d5790b380c8.png\" width=\"1282\" height=\"850\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d5e\/b04\/c80\/d5eb04c80cff104d03bc7d5790b380c8.png\"\/><\/figure>\n<p>\u0414\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0438\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u044f\u043c\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438, \u0438\u0437\u0434\u0430\u043d\u0438\u044f\u043c\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0421\u0423\u0411\u0414, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u00ab\u041c\u043d\u043e\u0433\u0438\u0435\u2011\u043a\u043e\u2011\u043c\u043d\u043e\u0433\u0438\u043c\u00bb. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043f\u043e\u043a\u0430\u0436\u0443 \u043d\u0430\u00a0\u043f\u0430\u043b\u044c\u0446\u0430\u0445, \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/863\/077\/8db\/8630778db85c51d313bf3798429b7613.png\" width=\"197\" height=\"127\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/863\/077\/8db\/8630778db85c51d313bf3798429b7613.png\"\/><\/figure>\n<p>\u0418 \u043c\u044b \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u00a0\u043f\u0435\u0440\u0432\u0443\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 (1\u041d\u0424):<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7d1\/845\/cfd\/7d1845cfd22566cb26ec5ad4b4b626ad.png\" width=\"197\" height=\"119\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7d1\/845\/cfd\/7d1845cfd22566cb26ec5ad4b4b626ad.png\"\/><\/figure>\n<p>\u0412\u00a0\u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u0434\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<ol start=\"2\">\n<li>\n<p> \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f9e\/235\/c10\/f9e235c10f650a1efc15f602f78ea1c7.png\" width=\"407\" height=\"115\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9e\/235\/c10\/f9e235c10f650a1efc15f602f78ea1c7.png\"\/><\/figure>\n<ol start=\"3\">\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430\u00a0\u0434\u0432\u0435, \u0430\u00a0\u0434\u043b\u044f\u00a0\u0438\u0445 \u0441\u0432\u044f\u0437\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u044b ID \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0438 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439:   <\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ceb\/e1b\/a66\/cebe1ba6639f65667ecd534699da923c.png\" width=\"735\" height=\"130\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ceb\/e1b\/a66\/cebe1ba6639f65667ecd534699da923c.png\"\/><\/figure>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0438\u0432\u0451\u043b \u0432\u044b\u0448\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c \u00ab\u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u00a0\u043f\u0430\u043b\u044c\u0446\u0430\u0445\u00bb, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u044d\u0442\u043e \u043d\u0430\u00a0Python: <\/p>\n<pre><code class=\"python\">import itertools import pandas as pd  # \u0447\u0438\u0442\u0430\u0435\u043c json \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u043f\u043e 10000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 chunks = pd.read_json(raw_data_line, chunksize=10000, lines = True) lst_authors = [] lst_paper_author = [] lst_venues = [] lst_references = []  i=0  # \u0446\u0438\u043a\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 for chunk in chunks:          chunk.fillna('', inplace = True)     #\u0410\u0412\u0422\u041e\u0420\u042b           paper_author_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['authors'].fillna('')))                               if x[1] != '']      paper_author_pairs = [item for x in paper_author_tuples                            for item in list(itertools.product(x[0],x[1]))]      paper_author_pairs = [(x[0], {k:v for k,v in x[1].items()                                    if k in ['_id', 'name', 'org']})                            for x in paper_author_pairs ]      paper_author_pairs = fix_ids(paper_author_pairs)       paper_author = [{'paper_id': x[0], 'author_id': x[1]['_id']}                                  for x in paper_author_pairs]      authors = [x[1] for x in paper_author_pairs]          lst_paper_author.extend(paper_author)     lst_authors.extend(authors)      # \u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (venues)     # \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u0430 \u043e\u0434\u043d\u043e        # references          if 'references' in chunk:         references_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['references']))                               if x[1] != '']         references_pairs = [item for x in references_tuples                           for item in list(itertools.product(x[0],x[1]))]         lst_references.extend(references_pairs)                  del chunk['references']          del chunk['authors']               chunk.to_csv(f'clearsets\\\\papers-{i}.csv', sep='\\t', encoding='utf-8')     i+=1   # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u0438\u0445 id pd.DataFrame(lst_authors).drop_duplicates(subset='_id').to_csv(f'clearsets\\\\authors.csv', sep='\\t', encoding='utf-8')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441\u043e \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 pd.DataFrame(lst_paper_author).to_csv(f'clearsets\\\\paper_author.csv', sep='\\t', encoding='utf-8')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 pd.DataFrame(lst_references).to_csv(f'clearsets\\\\references.csv', sep='\\t', encoding='utf-8') <\/code><\/pre>\n<p>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0412 \u0446\u0435\u043b\u043e\u043c, \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u0439, \u0447\u0442\u043e \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435. <\/p>\n<pre><code class=\"python\"># \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (id \u0441\u0442\u0430\u0442\u044c\u0438, [\u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435])      paper_author_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['authors'].fillna('')))                               if x[1] != '']      # \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 \u0432\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439     # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440 (\u043e\u0434\u0438\u043d id \u0441\u0442\u0430\u0442\u044c\u0438, \u043e\u0434\u0438\u043d \u0430\u0432\u0442\u043e\u0440)      paper_author_pairs = [item for x in paper_author_tuples                            for item in list(itertools.product(x[0],x[1]))]      # \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0430\u0432\u0442\u043e\u0440\u0430\u0445, \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432      paper_author_pairs = [(x[0], {k:v for k,v in x[1].items()                                    if k in ['_id', 'name', 'org']})                            for x in paper_author_pairs ]        # \u043f\u0430\u0440\u044b \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0435\u0439     paper_author = [{'paper_id': x[0], 'author_id': x[1]['_id']}                                  for x in paper_author_pairs]      authors = [x[1] for x in paper_author_pairs]          lst_paper_author.extend(paper_author)     lst_authors.extend(authors)<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/342\/f70\/0c9\/342f700c9c735c2b9bd3b6bb2fcc7c7c.png\" width=\"1322\" height=\"780\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/342\/f70\/0c9\/342f700c9c735c2b9bd3b6bb2fcc7c7c.png\"\/><\/figure>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442 \u0434\u0430\u0436\u0435 ID, \u043e \u0447\u0435\u043c \u043d\u0430\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0440\u0435\u0447\u0438\u0432\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.   <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/174\/e7d\/a61\/174e7da61764989570e9e7ef902aa961.png\" width=\"1192\" height=\"598\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/174\/e7d\/a61\/174e7da61764989570e9e7ef902aa961.png\"\/><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0445 ID \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<pre><code class=\"python\">import uuid  def fix_ids(pairs):         for pair in pairs:         if '_id' not in pair[1]:             pair[1]['_id'] = uuid.uuid4().hex[:24]     return pairs   # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u0438 paper_author_pairs = fix_ids(paper_author_pairs)<\/code><\/pre>\n<p>\u0412\u044b\u0431\u043e\u0440 24-\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e UUID \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 ID \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0438 \u0443\u00a0\u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0434\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. <\/p>\n<p>\u0417\u0430\u00a0\u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e ID\u00a0\u2014 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ID \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u00a0\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0442\u0430\u0431\u043b\u0438\u0446, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0425\u043e\u0442\u044f \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u00a0\u043c\u0435\u043d\u044f \u043d\u0435\u00a0\u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043a\u0441\u0442\u0430\u0442\u0438, \u0421\u0423\u0411\u0414 \u0442\u043e\u0436\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442). \u042d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0442\u044c \u043d\u0435\u00a0\u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u00a0\u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ba8\/c98\/024\/ba8c98024eab182613b702947eb6df7c.jpg\" width=\"596\" height=\"431\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ba8\/c98\/024\/ba8c98024eab182613b702947eb6df7c.jpg\" data-blurred=\"true\"\/><\/figure>\n<h3>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c, \u0434\u0430\u00a0\u0435\u0449\u0435 \u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u00a0\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 SQL\u2011\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0427\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u00a0\u0447\u0430\u043d\u043a\u0430\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0441\u043b\u0435\u0434\u0438\u043c \u0437\u0430\u00a0\u0438\u0445 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u00a0\u0446\u0435\u043b\u043e\u043c, \u0437\u043d\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u0434\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u00a0\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0432\u0435\u0434\u044c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043d\u0435\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u0441\u0447\u0451\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437. \u0410\u00a0\u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00a0\u2014 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b SQL. \u0423\u0434\u0430\u0447\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/721464\/\"> https:\/\/habr.com\/ru\/articles\/721464\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442\u00a0\u0416\u0435\u0440\u043e\u043d\u043a\u0438\u043d \u0410\u043d\u0442\u043e\u043d, \u044f Data Engineer<strong> <\/strong>\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a <a href=\"https:\/\/newtechaudit.ru\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA.<\/a>  <\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u0442\u0430\u2011\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0447\u0435\u043c\u0443: \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u00a0\u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.aminer.org\/citation\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u0442\u0430\u0441\u0435\u0442<\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0437\u00a0\u0441\u0435\u0431\u044f \u043e\u043a\u043e\u043b\u043e 5\u00a0\u043c\u043b\u043d. \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u043d\u0438\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 (\u0430\u0432\u0442\u043e\u0440\u044b, \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430, \u0438\u00a0\u0442.\u00a0\u0434.). <\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e\u00a0\u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u00a0PostgreSQL. \u041f\u0440\u0438\u00a0\u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u00a0\u0431\u044b\u043b\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u0410\u0432\u0442\u043e\u0440\u00bb, \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u00bb, \u00ab\u0421\u0442\u0430\u0442\u044c\u044f\u00bb\u2011\u00bb\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e\u00bb. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u00a0MongoDB, \u0432\u0435\u0434\u044c \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0421\u0423\u0411\u0414 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043d\u043e\u00a0\u0432\u00a0\u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043d\u0435\u0439. <\/p>\n<p>\u0414\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043e\u0434\u043d\u043e\u0433\u043e JSON\u2011\u0444\u0430\u0439\u043b\u0430. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0437\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438\u00a0\u2014 \u0441\u00a0\u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f? \u0423\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0438 \u043e\u043d\u0430, \u043d\u0430\u00a0\u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439\u00a0\u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0\u043b\u044e\u0431\u043e\u0439 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0432\u0438\u0434. \u041f\u0440\u0438\u00a0\u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u00a0\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u0432\u0438\u0434, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440 \u0438\u0445 ID. \u0422\u0430\u043a \u0434\u0443\u043c\u0430\u043b \u0438 \u044f, \u0440\u0435\u0448\u0438\u0432, \u0447\u0442\u043e\u00a0\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u00a0\u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0441\u00a0\u0447\u0435\u043c \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f\u00a0\u2014 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 (17\u00a0\u0413\u0411) \u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 (\u043d\u0430\u0440\u0443\u0448\u0435\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u043a\u043e\u0431\u043e\u043a) JSON\u2011\u0437\u0430\u043f\u0438\u0441\u0438. <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435\u00a0\u2014 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0441\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0421\u043b\u0430\u0431\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435\u00a0\u2014 \u044d\u0442\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u00a0\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0447\u0451\u0442\u043a\u043e \u0438 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a\u00a0\u0432\u00a0\u0442\u0435\u0445\u00a0\u0436\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0421\u0423\u0411\u0414. \u0412\u00a0\u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445, \u0430\u00a0\u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430\u00a0\u2014\u00a0\u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f\u00a0\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438\u0437\u00a0\u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u0432\u0435\u0434\u043e\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437.\u00a0\u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u00a0pandas \u0441\u00a0\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u043f\u043e\u00a0\u0433\u0440\u0443\u043f\u043f\u0430\u043c \u0441\u0442\u0440\u043e\u043a (\u0447\u0430\u043d\u043a\u0430\u043c), \u0442.\u043a.:<\/p>\n<ul>\n<li>\n<p>\u0421\u044b\u0440\u043e\u0439 JSON\u2011\u0444\u0430\u0439\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 17\u00a0\u0413\u0411 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043d\u0435\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u043a\u00a0\u0432\u00a0\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0442\u0430\u043a \u0438 \u0432\u00a0\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 json. \u0412\u00a0pandas \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f.\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 chunksize \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u044f\u0441\u043d\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043a\u0430\u043a\u00a0\u043e\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u00a0JSON, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0432\u00a0\u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435. Pandas \u0445\u043e\u0442\u044f\u00a0\u0431\u044b \u043d\u0430\u00a0\u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439.<\/p>\n<p>\u041a\u0430\u043a\u00a0\u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0430\u0432\u0442\u043e\u0440\u044b, \u0438\u0437\u0434\u0430\u043d\u0438\u044f), \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u044b \u043d\u0435\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430\u00a0\u2014 \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f\u00a0\u2014 \u043e\u0434\u0438\u043d \u0430\u0432\u0442\u043e\u0440), \u0430\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0438\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u044f\u043c\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438, \u0438\u0437\u0434\u0430\u043d\u0438\u044f\u043c\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0421\u0423\u0411\u0414, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u00ab\u041c\u043d\u043e\u0433\u0438\u0435\u2011\u043a\u043e\u2011\u043c\u043d\u043e\u0433\u0438\u043c\u00bb. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043f\u043e\u043a\u0430\u0436\u0443 \u043d\u0430\u00a0\u043f\u0430\u043b\u044c\u0446\u0430\u0445, \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0418 \u043c\u044b \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u00a0\u043f\u0435\u0440\u0432\u0443\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 (1\u041d\u0424):<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><\/figure>\n<p>\u0412\u00a0\u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u0434\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<ol start=\"2\">\n<li>\n<p> \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><\/figure>\n<ol start=\"3\">\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430\u00a0\u0434\u0432\u0435, \u0430\u00a0\u0434\u043b\u044f\u00a0\u0438\u0445 \u0441\u0432\u044f\u0437\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u044b ID \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0438 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439:   <\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0438\u0432\u0451\u043b \u0432\u044b\u0448\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c \u00ab\u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u00a0\u043f\u0430\u043b\u044c\u0446\u0430\u0445\u00bb, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u044d\u0442\u043e \u043d\u0430\u00a0Python: <\/p>\n<pre><code class=\"python\">import itertools import pandas as pd  # \u0447\u0438\u0442\u0430\u0435\u043c json \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u043f\u043e 10000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 chunks = pd.read_json(raw_data_line, chunksize=10000, lines = True) lst_authors = [] lst_paper_author = [] lst_venues = [] lst_references = []  i=0  # \u0446\u0438\u043a\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 for chunk in chunks:          chunk.fillna('', inplace = True)     #\u0410\u0412\u0422\u041e\u0420\u042b           paper_author_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['authors'].fillna('')))                               if x[1] != '']      paper_author_pairs = [item for x in paper_author_tuples                            for item in list(itertools.product(x[0],x[1]))]      paper_author_pairs = [(x[0], {k:v for k,v in x[1].items()                                    if k in ['_id', 'name', 'org']})                            for x in paper_author_pairs ]      paper_author_pairs = fix_ids(paper_author_pairs)       paper_author = [{'paper_id': x[0], 'author_id': x[1]['_id']}                                  for x in paper_author_pairs]      authors = [x[1] for x in paper_author_pairs]          lst_paper_author.extend(paper_author)     lst_authors.extend(authors)      # \u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (venues)     # \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u0430 \u043e\u0434\u043d\u043e        # references          if 'references' in chunk:         references_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['references']))                               if x[1] != '']         references_pairs = [item for x in references_tuples                           for item in list(itertools.product(x[0],x[1]))]         lst_references.extend(references_pairs)                  del chunk['references']          del chunk['authors']               chunk.to_csv(f'clearsets\\\\papers-{i}.csv', sep='\\t', encoding='utf-8')     i+=1   # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u0438\u0445 id pd.DataFrame(lst_authors).drop_duplicates(subset='_id').to_csv(f'clearsets\\\\authors.csv', sep='\\t', encoding='utf-8')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441\u043e \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 pd.DataFrame(lst_paper_author).to_csv(f'clearsets\\\\paper_author.csv', sep='\\t', encoding='utf-8')  # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c csv \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 pd.DataFrame(lst_references).to_csv(f'clearsets\\\\references.csv', sep='\\t', encoding='utf-8') <\/code><\/pre>\n<p>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0412 \u0446\u0435\u043b\u043e\u043c, \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u0439, \u0447\u0442\u043e \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435. <\/p>\n<pre><code class=\"python\"># \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (id \u0441\u0442\u0430\u0442\u044c\u0438, [\u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435])      paper_author_tuples = [([x[0]], x[1])                               for x in list(zip(chunk['_id'], chunk['authors'].fillna('')))                               if x[1] != '']      # \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 \u0432\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439     # \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440 (\u043e\u0434\u0438\u043d id \u0441\u0442\u0430\u0442\u044c\u0438, \u043e\u0434\u0438\u043d \u0430\u0432\u0442\u043e\u0440)      paper_author_pairs = [item for x in paper_author_tuples                            for item in list(itertools.product(x[0],x[1]))]      # \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0430\u0432\u0442\u043e\u0440\u0430\u0445, \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432      paper_author_pairs = [(x[0], {k:v for k,v in x[1].items()                                    if k in ['_id', 'name', 'org']})                            for x in paper_author_pairs ]        # \u043f\u0430\u0440\u044b \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0435\u0439     paper_author = [{'paper_id': x[0], 'author_id': x[1]['_id']}                                  for x in paper_author_pairs]      authors = [x[1] for x in paper_author_pairs]          lst_paper_author.extend(paper_author)     lst_authors.extend(authors)<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442 \u0434\u0430\u0436\u0435 ID, \u043e \u0447\u0435\u043c \u043d\u0430\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0440\u0435\u0447\u0438\u0432\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.   <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0445 ID \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<pre><code class=\"python\">import uuid  def fix_ids(pairs):         for pair in pairs:         if '_id' not in pair[1]:             pair[1]['_id'] = uuid.uuid4().hex[:24]     return pairs   # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u0438 paper_author_pairs = fix_ids(paper_author_pairs)<\/code><\/pre>\n<p>\u0412\u044b\u0431\u043e\u0440 24-\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e UUID \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 ID \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0438 \u0443\u00a0\u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0434\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. <\/p>\n<p>\u0417\u0430\u00a0\u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e ID\u00a0\u2014 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ID \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u00a0\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0442\u0430\u0431\u043b\u0438\u0446, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0425\u043e\u0442\u044f \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u00a0\u043c\u0435\u043d\u044f \u043d\u0435\u00a0\u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043a\u0441\u0442\u0430\u0442\u0438, \u0421\u0423\u0411\u0414 \u0442\u043e\u0436\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442). \u042d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0442\u044c \u043d\u0435\u00a0\u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u00a0\u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u00a0\u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. <\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c, \u0434\u0430\u00a0\u0435\u0449\u0435 \u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u00a0\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 SQL\u2011\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0427\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u00a0\u0447\u0430\u043d\u043a\u0430\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0441\u043b\u0435\u0434\u0438\u043c \u0437\u0430\u00a0\u0438\u0445 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u00a0\u0446\u0435\u043b\u043e\u043c, \u0437\u043d\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e\u0434\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u00a0\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0432\u0435\u0434\u044c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043d\u0435\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u0441\u0447\u0451\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437. \u0410\u00a0\u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00a0\u2014 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b SQL. \u0423\u0434\u0430\u0447\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/721464\/\"> https:\/\/habr.com\/ru\/articles\/721464\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-408838","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=408838"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408838\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}