ZhangZhihui's Blog  
上一页 1 2 3 4 5 6 ··· 102 下一页

2025年9月28日

摘要: 适用于GreenPlum, GaussDB, PostgreSQL: import psycopg2 conn = psycopg2.connect( dbname="your_db", user="your_user", password="your_password", host="your_h 阅读全文
posted @ 2025-09-28 09:08 ZhangZhihuiAAA 阅读(6) 评论(0) 推荐(0)

2025年9月26日

摘要: desc aaa; + + + + + + + | Field | Type | Null | Key | Default | Extra | + + + + + + + | id | int(11) | NO | PRI | NULL | auto_increment | | name | var 阅读全文
posted @ 2025-09-26 16:43 ZhangZhihuiAAA 阅读(8) 评论(0) 推荐(0)

2025年9月25日

摘要: INSERT INTO TABLE zzh_test VALUES (1, 1,1. 'AAA'), (2, 2.2, 'BBB'); INSERT OVERWRITE TABLE zzh_test SELECT * FROM zzh_test; INSERT INTO zzh_test VALUE 阅读全文
posted @ 2025-09-25 17:27 ZhangZhihuiAAA 阅读(6) 评论(0) 推荐(0)
 
摘要: spark is a SparkSession object, what does spark.sql().collect() do? ChatGPT said: Good question 👍 Let’s break it down: spark → a SparkSession object. 阅读全文
posted @ 2025-09-25 10:38 ZhangZhihuiAAA 阅读(8) 评论(0) 推荐(0)

2025年9月24日

摘要: ${flow.name} ${flow.id} ${job.name} ${job.id} ${biz.date} #20250924 ${yyyyMM} #202509 阅读全文
posted @ 2025-09-24 14:45 ZhangZhihuiAAA 阅读(5) 评论(0) 推荐(0)
 
摘要: with open("data.csv", "w", newline="", encoding="utf-8") as f Why use newline=""? Don't we need to break lines? ChatGPT said: Ah, good question! This 阅读全文
posted @ 2025-09-24 10:31 ZhangZhihuiAAA 阅读(9) 评论(0) 推荐(0)
 
摘要: Data contains single quote: import json from datetime import date, datetime def to_greenplum_value(v): if v is None: return "NULL" elif isinstance(v, 阅读全文
posted @ 2025-09-24 09:07 ZhangZhihuiAAA 阅读(5) 评论(0) 推荐(0)

2025年9月23日

摘要: import paramiko HOSTNAME = '' PORT = 22 USERNAME = '' PASSWORD = '' REMOTE_PATH = '' LOCAL_PATH = '' transport = paramiko.Transport((HOSTNAME, PORT)) 阅读全文
posted @ 2025-09-23 14:13 ZhangZhihuiAAA 阅读(7) 评论(0) 推荐(0)

2025年9月22日

摘要: import psycopg2 import json from datetime import date, datetime SRC_TABLE = "aaa" TARGET_TABLE = "bbb" # # Step 1: Connect to GaussDB # src_conn = psy 阅读全文
posted @ 2025-09-22 21:10 ZhangZhihuiAAA 阅读(7) 评论(0) 推荐(0)
 
摘要: GaussDB (openGauss / Huawei GaussDB) is PostgreSQL-compatible, so you can use the standard psycopg2 driver (or SQLAlchemy on top of it) to connect. He 阅读全文
posted @ 2025-09-22 16:36 ZhangZhihuiAAA 阅读(15) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 102 下一页