chore: Add debug prints for SQL query execution in stock data retrieval
This commit is contained in:
parent
d0583ddcc3
commit
8573399f9d
@ -84,7 +84,9 @@ def get_stock_data(ticker: str, start_date: datetime, end_date: datetime, interv
|
|||||||
ORDER BY interval_start ASC
|
ORDER BY interval_start ASC
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
print("\nExecuting Query:")
|
||||||
|
print(query) # Debugging: Print the query to verify its correctness
|
||||||
|
|
||||||
result = client.query(query)
|
result = client.query(query)
|
||||||
if not result.result_rows:
|
if not result.result_rows:
|
||||||
print(f"No data found for {ticker}")
|
print(f"No data found for {ticker}")
|
||||||
@ -313,6 +315,8 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
|||||||
result = client.query(query)
|
result = client.query(query)
|
||||||
qualified_stocks = [(row[0], row[1], row[2], row[3]) for row in result.result_rows]
|
qualified_stocks = [(row[0], row[1], row[2], row[3]) for row in result.result_rows]
|
||||||
|
|
||||||
|
qualified_stocks = [(row[0], row[1], row[2], row[3]) for row in result.result_rows]
|
||||||
|
|
||||||
if not qualified_stocks:
|
if not qualified_stocks:
|
||||||
print("No stocks found matching criteria.")
|
print("No stocks found matching criteria.")
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user