Skip to content

Commit

Permalink
Default to not modfying schema by default
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Jan 8, 2025
1 parent c0a4d8b commit df0dc3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions synapseclient/models/protocols/table_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ def store_rows(
- A dictionary where the key is the column name and the value is one or more values. The values will be wrapped into a [Pandas DataFrame](http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe).
- A [Pandas DataFrame](http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe)
schema_storage_strategy:
(Default): SchemaStorageStrategy.INFER_FROM_DATA
Determines how to automate the creation of columns
schema_storage_strategy: Determines how to automate the creation of columns
based on the data that is being stored. If you want to have full
control over the schema you may set this to `None` and create
the columns manually.
Expand All @@ -96,10 +93,7 @@ def store_rows(
The determination is based on how this pandas function infers the
data type: [infer_dtype](https://pandas.pydata.org/docs/reference/api/pandas.api.types.infer_dtype.html)
column_expansion_strategy:
(Default): ColumnExpansionStrategy.AUTO_EXPAND_CONTENT_AND_LIST_LENGTH
Determines how to automate the expansion of
column_expansion_strategy: Determines how to automate the expansion of
columns based on the data that is being stored. The options given allow
cells with a limit on the length of content (Such as strings) or cells
with a limit on the number of values (Such as lists) to be expanded to
Expand Down
4 changes: 2 additions & 2 deletions synapseclient/models/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ def fill_from_dict(
async def store_rows_async(
self,
values: Union[str, List[Dict[str, Any]], Dict[str, Any], pd.DataFrame],
schema_storage_strategy: SchemaStorageStrategy = SchemaStorageStrategy.INFER_FROM_DATA,
column_expansion_strategy: ColumnExpansionStrategy = ColumnExpansionStrategy.AUTO_EXPAND_CONTENT_AND_LIST_LENGTH,
schema_storage_strategy: SchemaStorageStrategy = None,
column_expansion_strategy: ColumnExpansionStrategy = None,
*,
synapse_client: Optional[Synapse] = None,
) -> None:
Expand Down

0 comments on commit df0dc3c

Please sign in to comment.