# Batch 2: 새 컬럼이 추가된 v2 스키마 (30건)
# 스키마: customer_id, name, email, city, registered_at, phone(신규), membership_level(신규)
customers_v2 = []
for i in range(1050, 1080):
customers_v2.append(json.dumps({
"customer_id": i,
"name": f"고객_{i}",
"email": f"customer{i}@example.com",
"city": random.choice(["서울", "부산", "대구", "인천", "광주"]),
"registered_at": f"2025-03-{random.randint(1,28):02d}T10:00:00Z",
# 새로 추가된 컬럼
"phone": f"010-{random.randint(1000,9999)}-{random.randint(1000,9999)}",
"membership_level": random.choice(["BRONZE", "SILVER", "GOLD", "PLATINUM"])
}, ensure_ascii=False))
json_content_v2 = "\n".join(customers_v2)
dbutils.fs.put(
"/Volumes/training/auto_loader_lab/raw_data/json/customers/customers_batch2.json",
json_content_v2,
overwrite=True
)
print(f"JSON 배치 2 (v2 스키마) 생성 완료: {len(customers_v2)}건")
print("추가된 컬럼: phone, membership_level")