python 代码
from pyarrow import parquet as pq
fs = s3fs.S3FileSystem(...)
path = ['s3a://.....']
r = pq.ParquetDataset(_path, filesystem=fs)
df = r.read().to_pandas()
df.to_sql(....)
相关的日志
Jan 18 14:18:33 kernel: Out of memory: Kill process 3342 (python3) score 842 or sacrifice child
Jan 18 14:18:33 kernel: Killed process 3342 (python3) total-vm:7950428kB, anon-rss:6945048kB, file-rss:0kB, shmem-rss:0kB
1
scalaer OP 漏了点处理
df['_time'] = df['time'].apply(lambda x: parse(x[:11] + " " + x[12:]).strftime("%Y-%m-%d %H:%M:%S")) df['bytes'] = df['request_size'] + df['response_size'] df['bytes'] = df['bytes'].astype(int) |