Skip to content

Commit 7424cc6

Browse files
committed
Delete unused code
1 parent 1b4d1d3 commit 7424cc6

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

airbyte_cdk/sources/file_based/file_types/excel_parser.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
import logging
66
from io import IOBase
77
from pathlib import Path
8-
import sys
9-
import tempfile
10-
import io
118
from typing import Any, Dict, Iterable, Mapping, Optional, Tuple, Union
12-
from collections import deque
139

1410
import orjson
1511
import pandas as pd
@@ -35,23 +31,6 @@
3531
from airbyte_cdk.sources.file_based.schema_helpers import SchemaType
3632

3733

38-
39-
def iter_records_via_tempfile(df: pd.DataFrame):
40-
"""
41-
Stream records using Pandas' to_json (so datetime strings match exactly),
42-
without building a giant string in RAM.
43-
44-
- Writes NDJSON to a temporary file (text-wrapped over a binary file)
45-
- Reads back line-by-line and yields parsed dicts
46-
"""
47-
with tempfile.NamedTemporaryFile(mode="w+", encoding="utf-8", delete=True) as f:
48-
df.to_json(f, orient="records", lines=True, date_format="iso", date_unit="us")
49-
f.seek(0)
50-
for line in f: # line is str
51-
if line.strip():
52-
yield orjson.loads(line)
53-
54-
5534
class ExcelParser(FileTypeParser):
5635
ENCODING = None
5736

0 commit comments

Comments
 (0)