Skip to content

Commit

Permalink
updates 2024-11-18 - small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Nov 18, 2024
1 parent c79b192 commit 04c10f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def _is_excel_url(self, url: str) -> bool:
"""Check if URL points to an Excel file"""
return any(url.lower().endswith(ext) for ext in ['.xlsx', '.xls', '.xlsm'])

def _is_csv_url(self, url:str) -> bool:
return any(url.lower().endswith(ext) for ext in ['.csv'])


def _process_excel_response(self, response: bytes, sheet_name: Optional[str] = None) -> Dict:
"""Process Excel file from response bytes using Polars"""
try:
Expand Down Expand Up @@ -108,7 +112,7 @@ def decorator(func):
def wrapper(context: AssetExecutionContext) -> bytes:
etl = BronzeETLBase(url_key, asset_urls)
try:
# Fetch data (now supports Excel with Polars)
# Fetch data
data = etl.fetch_data(sheet_name=sheet_name)

# Validate data only if model is provided
Expand Down

0 comments on commit 04c10f2

Please sign in to comment.