Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update param name on parquet source to match docs #804

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions python/pysrc/kaskada/sources/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def __init__(

@staticmethod
async def create(
url: Optional[str] = None,
file: Optional[str] = None,
*,
time_column: str,
key_column: str,
Expand All @@ -566,9 +566,9 @@ async def create(
If not specified (and not specified in the data), nanosecond will be assumed.
"""
if schema is None:
if url is None:
if file is None:
raise ValueError("Must provide schema or url to parquet file")
schema = await _ffi.parquet_schema(_get_session(), url)
schema = await _ffi.parquet_schema(_get_session(), file)
source = Parquet(
time_column=time_column,
key_column=key_column,
Expand All @@ -578,8 +578,8 @@ async def create(
time_unit=time_unit,
)

if url:
await source.add_file(url)
if file:
await source.add_file(file)
return source

async def add_file(self, file: str) -> None:
Expand Down
Loading