摘要: import json import psycopg2 import sys conn = psycopg2.connect(dbname='dev', host='127.0.0.1', port='5439', user='master', password='123456') cur = conn.cursor() column_name... 阅读全文
posted @ 2018-08-07 15:21 wangheng1409 阅读(486) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python3 import pymongo import datetime import os yesterday = str(datetime.date.today() - datetime.timedelta(days=1)) def mongo2csv(db_name, ts_string=yesterday, column_handle=None,... 阅读全文
posted @ 2018-08-07 14:51 wangheng1409 阅读(166) 评论(0) 推荐(0) 编辑