{"id":290905,"date":"2018-10-16T20:55:02","date_gmt":"2018-10-16T16:55:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290905"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290905","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Google BigQuery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Cloud Functions"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Google BigQuery \u2013 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u0430\u0445 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u043d\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0443 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0427\u0442\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0434\u0430\u0435\u0442? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043a\u0430\u0437 \u043f\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google BigQuery \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u0432\u043e\u0440\u043e\u043d\u043a\u0435 \u2013 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 \u0434\u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 brick and mortar \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0435 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u043e\u0444\u043b\u0430\u0439\u043d-\u043f\u0440\u043e\u0434\u0430\u0436.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0435 \u0443 \u043d\u0430\u0441 6 python-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <a href=\"https:\/\/cloud.google.com\/bigquery\/\">Google BigQuery<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/cloud.google.com\/functions\/\">Google Cloud \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a>: FTP; FTPS; HTTP(s); Intercom; MySQL \u0438 SFTP. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0434\u0438\u043d: \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e HTTP POST \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Cloud-\u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Google BigQuery. \u0415\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430. <\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f <\/h3>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0435\u043a\u0442 \u0432 Google Cloud Platform \u0441 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u043e\u043c.<\/li>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0440\u043e\u043b\u044c \u00ab\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u00bb \u0434\u0430\u043d\u043d\u044b\u0445 BigQuery) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 (\u0440\u043e\u043b\u044c \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0439 BigQuery) \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Cloud-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 BigQuery, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430;<\/li>\n<li>HTTP-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f POST \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0445 Cloud-\u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/li>\n<\/ol>\n<h3>\u042d\u0442\u0430\u043f\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/console.cloud.google.com\/home\/dashboard\/\">Google Cloud Platform Console<\/a> \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u0438\u043b\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0435\u0449\u0435 \u043d\u0435\u0442.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u043e\u043c \u0438\u043b\u0438 <a href=\"https:\/\/cloud.google.com\/billing\/docs\/how-to\/manage-billing-account#create_a_new_billing_account\">\u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435<\/a> \u043d\u043e\u0432\u044b\u0439 \u0431\u0438\u043b\u043b\u0438\u043d\u0433-\u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"https:\/\/console.cloud.google.com\/functions\/\">Cloud Functions<\/a> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00bb. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Cloud-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u0437\u0438\u043c\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/cloud.google.com\/functions\/pricing\">\u043f\u043b\u0430\u0442\u0430<\/a>.<\/li>\n<li>\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f:<\/li>\n<\/ul>\n<p>  <b>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:<\/b> \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ftp-bq-integration \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435;<\/p>\n<p>  <b>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438:<\/b> 2 \u0413\u0411 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430;<\/p>\n<p>  <b>\u0422\u0440\u0438\u0433\u0433\u0435\u0440:<\/b> HTTP;<\/p>\n<p>  <b>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:<\/b> \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440;<\/p>\n<p>  <b>\u0421\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/b> Python 3.X.<\/p>\n<ul>\n<li>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 main.py \u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0432\u043a\u043b\u0430\u0434\u043a\u0430 main.py.<\/li>\n<li>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 requirements.txt \u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0432\u043a\u043b\u0430\u0434\u043a\u0430 requirements.txt.<\/li>\n<li>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 ftp\/ftps\/https \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435.<\/li>\n<li>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0441 60 \u0441\u0435\u043a. \u0434\u043e 540 \u0441\u0435\u043a. \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/li>\n<li>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Cloud-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u00bb.<\/li>\n<\/ul>\n<h3><a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/ftp\">FTP<\/a> \/ <a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/ftps\">FTPS<\/a> \/ <a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/sftp\">SFTP<\/a><\/h3>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 FTP (FTPS, SFTP) \u2014 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 Google BigQuery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Cloud \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Google BigQuery \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>  \u0424\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 (.json, .txt, .csv), \u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432: JSON (newline-delimited) \u0438\u043b\u0438 Comma-separated values (CSV).<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">from urllib import urlencode from httplib2 import Http  trigger_url = \"https:\/\/REGION-PROJECT_ID.cloudfunctions.net\/ftp\/\" headers = { \"Content-Type\": \"application\/json\" } payload = {                \"ftp\":                          {                           \"user\": \"ftp.user_name\",                           \"psswd\": \"ftp.password\",                           \"path_to_file\": \"ftp:\/\/server_host\/path\/to\/file\/\"                         },                \"bq\":                          {                           \"project_id\": \"my_bq_project\",                           \"dataset_id\": \"my_bq_dataset\",                           \"table_id\": \"my_bq_table\",                           \"delimiter\": \",\",                           \"source_format\": \"NEWLINE_DELIMITED_JSON\",                           \"location\": \"US\"                         }             } Http().request(trigger_url, \"POST\", urlencode(payload), headers = headers)<\/code><\/pre>\n<h3><a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/https\">HTTP(s)<\/a><\/h3>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 HTTPS-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 Google BigQuery.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">from urllib import urlencode from httplib2 import Http  trigger_url = \"https:\/\/REGION-PROJECT_ID.cloudfunctions.net\/https\/\" headers = { \"Content-Type\": \"application\/json\" } payload = {                 \"https\":                          {                             \"path_to_file\": \"https:\/\/server_host\/path\/to\/file\/\",                             \"user\": \"https.user_name\",                             \"psswd\": \"https.password\"                         },                 \"bq\":                         {                             \"project_id\": \"my_bq_project\",                             \"dataset_id\": \"my_bq_dataset\",                             \"table_id\": \"my_bq_table\",                             \"delimiter\": \",\",                             \"source_format\": \"CSV\",                             \"location\": \"US\"                         }             }  Http().request(trigger_url, \"POST\", urlencode(payload), headers = headers)<\/code><\/pre>\n<h3><a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/intercom\">Intercom<\/a><\/h3>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Intercom \u0432 Google BigQuery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Cloud \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 Intercom \u0442\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a: users, companies, contacts, admins, conversations, teams, tags, segments. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 custom attributes.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">from urllib import urlencode from httplib2 import Http  trigger_url = \"https:\/\/REGION-PROJECT_ID.cloudfunctions.net\/intercom\/\" headers = { \"Content-Type\": \"application\/json\" } payload = {           \"intercom\": {             \"accessToken\": \"INTERCOM ACCESS TOKEN\",             \"entities\": [                     \"users\",                      \"companies\",                      \"contacts\",                      \"admins\",                     \"conversations\",                     \"teams\",                     \"tags\",                     \"segments\"                     ]                 },             \"bq\": {                 \"project_id\": \"YOUR GCP PROJECT\",                 \"dataset_id\": \"YOUR DATASET NAME\",                 \"location\": \"US\"              } } Http().request(trigger_url, \"POST\", urlencode(payload), headers = headers)<\/code><\/pre>\n<h3><a href=\"https:\/\/github.com\/OWOX\/BigQuery-integrations\/tree\/master\/mysql\">MySQL<\/a><\/h3>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 Google BigQuery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Cloud \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Google BigQuery \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 MySQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">from urllib import urlencode from httplib2 import Http  trigger_url = \"https:\/\/REGION-PROJECT_ID.cloudfunctions.net\/mysql\/\" headers = { \"Content-Type\": \"application\/json\" } payload = {             \"mysql\":                      {                         \"user\": \"mysql.user\",                         \"psswd\": \"mysql.password\",                         \"host\": \"host_name\",                         \"port\u201d: 3306,                         \"database\": \"database_name\",                         \"table_id\": \"table_name\",                         \"query\": \"SELECT * FROM table_name\"                     },             \"bq\":                      {                         \"project_id\": \"my_bq_projec\",                         \"dataset_id\": \"my_bq_dataset\",                         \"table_id\": \"my_bq_table\"                     } }  Http().request(trigger_url, \"POST\", urlencode(payload), headers = headers)<\/code><\/pre>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 readme \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432. <\/p>\n<p>  \u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0434\u043b\u044f Bitrix \u0438 amoCRM, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u0430\u043c\u044b\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u0430\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439 \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/426647\/\"> https:\/\/habr.com\/post\/426647\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Google BigQuery \u2013 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u0430\u0445 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u043d\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0443 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0427\u0442\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0434\u0430\u0435\u0442? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043a\u0430\u0437 \u043f\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google BigQuery \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u0432\u043e\u0440\u043e\u043d\u043a\u0435 \u2013 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 \u0434\u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 brick and mortar \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0435 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u043e\u0444\u043b\u0430\u0439\u043d-\u043f\u0440\u043e\u0434\u0430\u0436.<\/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-290905","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290905","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=290905"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290905\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}