摘要:
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
阅读(12)
推荐(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
阅读(13)
推荐(0)
摘要:
${flow.name} ${flow.id} ${job.name} ${job.id} ${biz.date} #20250924 ${yyyyMM} #202509
阅读全文
posted @ 2025-09-24 14:45
ZhangZhihuiAAA
阅读(7)
推荐(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
阅读(11)
推荐(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)
摘要:
import paramiko HOSTNAME = '' PORT = 22 USERNAME = '' PASSWORD = '' REMOTE_PATH = '' LOCAL_PATH = '' transport = paramiko.Transport((HOSTNAME, PORT))
阅读全文
posted @ 2025-09-23 14:13
ZhangZhihuiAAA
阅读(8)
推荐(0)
摘要:
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
阅读(10)
推荐(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
阅读(34)
推荐(0)
摘要:
1. Pull the ubuntu:24.04 image. 2. Set shared directory so that I can operate on files in both Windows and the container: 3. Create the Dockerfile fil
阅读全文
posted @ 2025-09-21 13:27
ZhangZhihuiAAA
阅读(6)
推荐(0)
摘要:
CREATE TABLE zzh_test (f_int int, f_str string); INSERT INTO TABLE zzh_test SELECT ${yyyy}, '${yyyy, -1}' || '年'; SELECT * FROM zzh_test; -- 2025 2024
阅读全文
posted @ 2025-09-18 10:34
ZhangZhihuiAAA
阅读(10)
推荐(0)