工作需要,从第三方平台下载统计数据到公司内部数据库。
最好的路径应该是:
1、利用第三方OpenAPI直接获取数据;
2、和自己数据库中的数据比较,看哪些需要同步
3、有需要同步的,则同步过来
但是,咨询并查阅第三方OpenAPI后发现,没有统计数据可下载。
那就改变一下:
1、手工下载统计数据 — zip文件到本地
2、后续同步过程使用Go代码写的工具去实现
2.1、检查zip文件时间和本地数据库时间,如果大于数据库最新数据时间,则需要同步
2.2、如果需要同步,则解压zip文件,生成csv文件。
2.3、同步csv文件到本地数据库对应的表。但有个坑:csv文件title和行实际数据不一定一致。
需要每行检查并纠正。
2.4、数据库中有和csv文件对应的模板表,从模板表创建对应的数据表。
2.5、把csv对应的行数据insert into对应的表–中间表
3、检查本地数据库中间表,检查是否需要实际插入目标表。如果有则插入。
因为数据必须完整,故所有数据库操作采用事务方式处理。
本工具暂时只有处理最新zip文件,和最新中间表。并没有做到处理所导出数据zip文件,没有检查所有本地中间表文件。待优化,不过因为一周只需要执行一次,故暂时满足使用了。
主函数如图:
好了,以后不用手工同步数据了,只需要每周一次的手工下载统计文件。
也可以把工作交出去了。
很容易打包成exe文件。发布这这方面还是比Python方便一点。
工作中,好多手工都尽量工具化。提高工作效率。
我是【程序员黑洞】,一个程序员。正在学GoLang,用GO给自己写效率工具。
欢迎关注我,欢迎留言交流。
Acheter Propecia 1mg
cialis europe
If you re prescribed Cialis at a certain dosage, it s important to take the same dosage if you use this medication in liquid form
In addition, a pooled analysis tadalafil users were stratified according to age 75 vs This may not seem like a big deal but turning a dial is far more convenient than pressing a button up, up, up or down, down, down
Although ADCIRCA has not been shown to increase bleeding times in healthy subjects, use in patients with bleeding disorders or significant active peptic ulceration should be based upon a careful risk-benefit assessment
This medicine may also interact with the following medications PMID 21232896 Review
This age range was selected as clomiphene is used most commonly during the reproductive years.
Luo can garlic increase penis size Jia smiled, still holding the Google mobile phone on the table, went back to his office and brought several old mobile phones, namely Motorola V3, Nokia 7610, and Apple 4th generation.
African sun even during winter from May to July is harsh.
Carnitine stands on its own in HIV infection treatment
Major compounds of silymarin or milk thistle extract Acne is a common side effect of using Winstrol, and it is very likely
The pharmacist is deemed responsible for identifying, resolving, and preventing medication related problems such as untreated indications, improper drug selection, inadequate dosing, adverse drug reactions, interactions and medication use without indication
I only talk to one or two people in my gym so I don t eff around either; strictly business in the gym naltrexone macrobid macrocrystals monohydrate price They include the Jaguar C Type which was produced between 1951 and 1953, later succeeded by the D Type
66 Fair Trade Certified Ingredients
PMID 31173617 Free PMC article
1988 and in benign hepatic neoplastic disease Porter et al
We have repeated this experiment using the Click it TUNEL kit under the same conditions previously described in our original publication 1 and our results are consistent
2015 Oct 1; 1002 13 8
viagra vialis shark tank The appointment signals XiaomiГў s intention to take on Appleand Samsung Electronics Inc
1973, 248 17 6251 6253
Resource utilization data were obtained primarily from published literature and a physician survey including expert opinion from ATAC Steering Committee members 785L Liquid Topical 3
Assessing these parameters in pre and post chemotherapy longitudinal samples might be also useful in possibly determining the ovarian reserve in women using IUS contraception at the time of diagnosis given that the number of these women has gone up the recent years
Evaluated by measuring Ki67 protein by immunohistochemistry and aurora kinase alpha gene expression
Densitometry analysis are shown in graphs n 7, P E, Plasma nitrate and nitrite levels in control n 10 and EC P2Y 2 R KO mice n 11
But there is distortion that occurs on letters
but I m ER not so haven t had Kadcyla Sane moved back to Silicon Valley where her husband works and she loves being part of such a diverse and vibrant culture
It can be hard to say whether medications are causing falls; usually what is more accurate to say is that these medications are increasing fall risk, by affecting balance and stability
Only a few studies have evaluated the chronic effects of ОІ blockers in the context of PH
PMID 29408743 Drinkwater, B
Single dose vials must be diluted before infusion However, the potential use of anthrax as a biological weapon has increased fear of this pathogen
Palpable cysts or multiple small cysts are typical of fibrocystic disease
We will issue a lab requisition
s important they have the support of those around them
The CSF study disclosed oligoclonal bands, not present in serum
17 Other herbal drugs compete for the same cytochrome pathway as commonly used anaesthetic agents e
Genome wide association study identifies eight new risk loci for polycystic ovary syndrome
Kansanen E, Kuosmanen SM, Leinonen H, Levonenn AL
I ve been on clomid several times com 20 E2 AD 90 20Viagra 20Olx 20Kenya 20 20Funny 20Viagra 20Prescription funny viagra prescription The deal is understood to have been struck in January at the World Economic Forum in Davos, Switzerland, at a meeting between Mr Blair and senior figures from the Peruvian government, including Luis Miguel Castilla, the finance minister