Skip to content

Docs: Clarify order preservation for returned row IDs #34

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

Closed
Closed
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion api-reference/v2/general/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ Even when using stashing, there are limits to the number of rows you can work wi
|---------------------------------------------------------------|------------|
| [Create Table](/api-reference/v2/tables/post-tables) | 8m |
| [Overwrite Table](/api-reference/v2/tables/put-tables) | 8m |
| [Add Rows to Table](/api-reference/v2/tables/post-table-rows) | 250k |
| [Add Rows to Table](/api-reference/v2/tables/post-table-rows) | 250k |

When adding rows to a table, the returned row IDs are guaranteed to be in the same order as the input rows provided in the request.
6 changes: 6 additions & 0 deletions api-reference/v2/resources/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Glide API Changelog
sidebarTitle: Changelog
---

### January 15, 2025

- Clarified that for endpoints returning row IDs, the IDs are returned in the same order as the input rows.

### November 26, 2024

- Added a warning that using the `PUT /tables` endpoint to overwrite a table will clear user-specific columns.
Expand Down Expand Up @@ -83,3 +87,5 @@ sidebarTitle: Changelog
- Support for creating, overwriting tables
- Support for adding rows to tables
- Support for stashing large datasets
</fileContent>
</invoke>
2 changes: 1 addition & 1 deletion api-reference/v2/stashing/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following endpoints support the use of a stash. Please see the specific endp

* [Create Table](/api-reference/v2/tables/post-tables)
* [Overwrite Table](/api-reference/v2/tables/put-tables)
* [Add Rows to Table](/api-reference/v2/tables/post-table-rows)
* [Add Rows to Table](/api-reference/v2/tables/post-table-rows) - When using this endpoint, the row IDs in the response are returned in the same order as the input rows in your request.

## Use Cases

Expand Down
2 changes: 2 additions & 0 deletions api-reference/v2/tables/post-table-rows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ Row data may be passed in JSON, CSV, or TSV format.
```
</Accordion>
</AccordionGroup>

The returned row IDs will be in the same order as the input rows provided in the request.
2 changes: 2 additions & 0 deletions api-reference/v2/tables/post-tables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ When using a CSV or TSV request body, the name of the table must be passed as a
}
```

The response will include row IDs for all created rows, returned in the same order as the input rows.

However, this is only appropriate for relatively small initial datasets (around a few hundred rows or less, depending on schema complexity). If you need to work with a larger dataset you should utilize stashing.
</Accordion>
<Accordion title="Create Table from Stash">
Expand Down
4 changes: 4 additions & 0 deletions api-reference/v2/tutorials/bulk-import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ To create a table with the data of the stash ID `20240501-import` you can use th
}
```

The endpoint will return a list of row IDs in the same order as the rows in your stashed data, preserving the order defined by the serial numbers in your stash uploads.

### Add Rows to Table

To add data to an existing table you can use the [add rows to table](/api-reference/v2/tables/post-table-rows) endpoint with the `stashID` reference of `20240501-import` instead of the actual row values.
Expand All @@ -99,6 +101,8 @@ To add data to an existing table you can use the [add rows to table](/api-refere
}
```

The endpoint will return a list of row IDs in the same order as the rows in your stashed data, preserving the order defined by the serial numbers in your stash uploads.

### Overwrite Table

To reset an existing table's data you can use the [overwrite table](/api-reference/v2/tables/put-tables) endpoint with the `stashID` reference of `20240501-import` instead of the actual row values.
Expand Down
Loading