Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Jan 5, 2023
1 parent 6870fc6 commit 302efaa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion python-sdk/src/astro/databases/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ def load_file_to_table(
columns_names_capitalization: ColumnCapitalization = "original",
enable_native_fallback: bool | None = LOAD_FILE_ENABLE_NATIVE_FALLBACK,
load_options: LoadOptions | None = None,
databricks_job_name: str = "", # skipcq PYL-W0613
**kwargs,
):
"""
Expand Down
4 changes: 1 addition & 3 deletions python-sdk/src/astro/dataframes/load_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

@define
class PandasLoadOptions(LoadOptions):
@property
def to_dict(self):
return dict(filter(lambda x: x[1], asdict(self).items()))
pass


@define
Expand Down
2 changes: 1 addition & 1 deletion python-sdk/tests/files/type/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_read_csv_file_with_pandas_opts(mock_read_csv):
csv_type = CSVFileType(path)
with open(path) as file:
csv_type.export_to_dataframe(file, load_options=CsvLoadOption(delimiter="$"))
mock_read_csv.assert_called_once_with(file, delimiter="$")
mock_read_csv.assert_called_once_with(file, delimiter="$", dtype=None)


def test_write_csv_file():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def test_aql_nested_ndjson_file_to_database_explicit_illegal_sep_params(sample_d
indirect=True,
ids=["snowflake"],
)
def test_loadfile_delimiter(sample_dag, database_table_fixture):
def test_load_file_delimiter(sample_dag, database_table_fixture):
_, test_table = database_table_fixture

path = str(CWD) + "/../../data/delimiter_dollar.csv"
Expand Down

0 comments on commit 302efaa

Please sign in to comment.