This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | |
<rss version="2.0" | |
xmlns:atom="http://www.w3.org/2005/Atom"> | |
<channel> | |
<title>RStudio Blog</title> | |
<link>https://blog.rstudio.com/</link> | |
<description>Recent content on RStudio Blog</description> | |
<generator>Hugo -- gohugo.io</generator> | |
<language>en-us</language> | |
<managingEditor>info@rstudio.com (RStudio, Inc.)</managingEditor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from os import path, listdir | |
import shutil | |
import pandas as pd | |
class Numbers: | |
def __init__(self, name): | |
self.name = name | |
self.folder = path.expanduser('~/Desktop/' + name + '.csv') | |
self.clear() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table if not exists test_table( | |
x string | |
); | |
insert into table test_table | |
select '${bdp.system.bizdate}' from dual; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# ############################################################################ | |
# 内容: 实例(instance)元信息分区表 | |
# 表: meta_instances | |
# 调度: 0 0 * * * /usr/bin/python3 odps_meta_instances.py | |
# 日志: odps_meta_instances.log | |
# ############################################################################ | |
from multiprocessing import Pool | |
from datetime import datetime, timedelta, time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# ########################################################################################### | |
# 内容: 表字段(field)元信息历史表 | |
# 脚本: odps_meta_fields.py | |
# 调度: 0 0 * * * /usr/bin/python3 odps_meta_fields.py | |
# 日志: odps_meta_fields.log | |
# ########################################################################################### | |
from multiprocessing import Pool | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# ########################################################################################### | |
# 内容: 表(tables)元信息历史表 | |
# 脚本: odps_meta_tables.py | |
# 调度: 0 0 * * * /usr/bin/python3 odps_meta_tables.py | |
# 日志: odps_meta_tables.log | |
# ########################################################################################### | |
from datetime import datetime, timedelta | |
from odps import ODPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/anaconda3/bin/python3 | |
# -*- coding:utf-8 -*- | |
################################################# | |
# ## 脚本: 拉取阿里云MaxCompute周期性任务的脚本(SQL/PY/SH) | |
# ## 环境:Ubuntu16.04 | |
# ## 日期: 2018-03-31 | |
# ## 作者: elisong.ah@gmail.com | |
################################################# | |
import os | |
import shutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from odps import ODPS | |
from urllib.parse import parse_qs | |
import time | |
import requests | |
import xml.etree.cElementTree as etree | |
odps = ODPS(access_id='<your access id>', | |
secret_access_key='<your access key>', | |
project='<your project>', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################ | |
# 执行环境: Linux server with python (pyodps) | |
# 脚本: unit_run.sh | |
# 参数: s(起始日期)=yyyymmdd, e(结束日期)=yyyymmdd, f(每日ETL脚本)=file.sql | |
# 日志: yyyymmdd_yyyymmdd_file.log | |
############################################################################################ | |
while getopts "s:e:f:" arg | |
do | |
case $arg in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odps import ODPS | |
from odps.df import DataFrame | |
conf = '<pyodps.ini>' | |
parm = {} | |
with open(conf) as f: | |
for line in f: | |
key, value = line.strip().split('=') | |
parm[key] = value |
NewerOlder