Files
kjh2064 15c7971018
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Failing after 4s
Quant Engine CI/CD Pipeline / validate-core (pull_request) Failing after 2m15s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been skipped
chore: root 경로의 미사용/과거 문서 및 스크립트를 docs/ 하위로 정리 격리
2026-06-26 11:35:42 +09:00

38 lines
1.0 KiB
Python

#!/usr/bin/env python3
import sqlite3
from pathlib import Path
db_path = 'src/quant_engine/kis_data_collection.db'
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# 테이블 확인
cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
tables = [row[0] for row in cursor.fetchall()]
print('='*80)
print('KIS Data Collection DB Status')
print('='*80)
print(f'File size: {Path(db_path).stat().st_size / 1024:.2f} KB')
print(f'Tables: {tables}')
# data_feed 레코드 조회
if 'data_feed' in tables:
cursor.execute('SELECT COUNT(*) FROM data_feed')
count = cursor.fetchone()[0]
print(f'\ndata_feed table: {count} records')
# 샘플 출력
cursor.execute('''
SELECT ticker, name, close_price, entry_date, entry_stage, sector
FROM data_feed
ORDER BY entry_date DESC
''')
print('\n[Loaded Records]')
for row in cursor.fetchall():
ticker, name, price, date, stage, sector = row
print(f' {ticker:8} | {name:15} | {price:>10.0f} KRW | {date} | {stage:4} | {sector}')
conn.close()