Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
8 changes: 4 additions & 4 deletions bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ def _read_gbq_with_ordering(
def _read_bigquery_load_job(
self,
filepath_or_buffer: str | IO["bytes"],
table: bigquery.Table,
table: Union[bigquery.Table, bigquery.TableReference],
*,
job_config: bigquery.LoadJobConfig,
index_col: Iterable[str] | str = (),
Expand Down Expand Up @@ -1042,7 +1042,7 @@ def read_csv(
encoding: Optional[str] = None,
**kwargs,
) -> dataframe.DataFrame:
table = bigquery.Table(self._create_session_table())
table = bigframes_io.random_table(self._anonymous_dataset)

if engine is not None and engine == "bigquery":
if any(param is not None for param in (dtype, names)):
Expand Down Expand Up @@ -1156,7 +1156,7 @@ def read_parquet(
# Note: "engine" is omitted because it is redundant. Loading a table
# from a pandas DataFrame will just create another parquet file + load
# job anyway.
table = bigquery.Table(self._create_session_table())
table = bigframes_io.random_table(self._anonymous_dataset)

job_config = bigquery.LoadJobConfig()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We forgot to set the table expiration. I can follow-up with a PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

job_config.create_disposition = bigquery.CreateDisposition.CREATE_IF_NEEDED
Expand All @@ -1179,7 +1179,7 @@ def read_json(
engine: Literal["ujson", "pyarrow", "bigquery"] = "ujson",
**kwargs,
) -> dataframe.DataFrame:
table = bigquery.Table(self._create_session_table())
table = bigframes_io.random_table(self._anonymous_dataset)

if engine == "bigquery":

Expand Down