-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from tableflowhq/feature/schemaless-data-types
Schemaless data types support
- Loading branch information
Showing
35 changed files
with
392 additions
and
149 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
title: "Download Import CSV" | ||
openapi: "GET /import/{id}/download" | ||
--- | ||
|
||
Retrieve an import as a CSV file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,31 @@ title: "Get Import Rows" | |
openapi: "GET /import/{id}/rows" | ||
--- | ||
|
||
Retrieve the rows of an import as JSON. This endpoint supports pagination by using a limit/offset. If the limit and offset are not provided, it will return the first 1000 rows of the import. | ||
Retrieve the rows of an import as JSON. This endpoint supports pagination by using a limit/offset. If the limit and offset are not provided, it will return the first 1,000 rows of the import. | ||
|
||
To use the limit/offset, start by setting the offset to 0 and the limit to 100 to get the first 100 rows of data. To get the next 100 rows, set the offset to 100 while keeping the limit the same. Continue increasing the offset by 100 until no more rows are returned. | ||
|
||
Note: the max limit is 1000. | ||
<Info>The maximum `limit` is 1000.</Info> | ||
|
||
### Example Response | ||
|
||
```json | ||
[ | ||
{ | ||
"index": 0, | ||
"values": { | ||
"age": 23, | ||
"email": "[email protected]", | ||
"first_name": "Maria" | ||
} | ||
}, | ||
{ | ||
"index": 1, | ||
"values": { | ||
"age": 32, | ||
"email": "[email protected]", | ||
"first_name": "Robert" | ||
} | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,63 @@ | ||
--- | ||
title: "Get Import Metadata" | ||
title: "Get Import" | ||
openapi: "GET /import/{id}" | ||
--- | ||
|
||
Retrieve the row data, column definitions, and other information about the import. | ||
|
||
<Info>The number of rows included is limited to 10,000. If there are more than 10,000 rows, an `error` will be set and | ||
the data should be retrieved using the [/rows](/api-reference/get-import-rows) endpoint.</Info> | ||
|
||
### Example Response | ||
|
||
```json | ||
{ | ||
"id": "da5554e3-6c87-41b2-9366-5449a2f15b53", | ||
"importer_id": "a0fadb1d-9888-4fcb-b185-25b984bcb227", | ||
"num_rows": 2, | ||
"num_columns": 3, | ||
"num_processed_values": 5, | ||
"metadata": { | ||
"user_id": 1234, | ||
"user_email": "[email protected]", | ||
"environment": "staging" | ||
}, | ||
"created_at": 1698172312, | ||
"error": null, | ||
"columns": [ | ||
{ | ||
"data_type": "number", | ||
"key": "age", | ||
"name": "Age" | ||
}, | ||
{ | ||
"data_type": "string", | ||
"key": "email", | ||
"name": "Email" | ||
}, | ||
{ | ||
"data_type": "string", | ||
"key": "first_name", | ||
"name": "First Name" | ||
} | ||
], | ||
"rows": [ | ||
{ | ||
"index": 0, | ||
"values": { | ||
"age": 23, | ||
"email": "[email protected]", | ||
"first_name": "Maria" | ||
} | ||
}, | ||
{ | ||
"index": 1, | ||
"values": { | ||
"age": 32, | ||
"email": "[email protected]", | ||
"first_name": "Robert" | ||
} | ||
} | ||
] | ||
} | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -302,68 +302,62 @@ uploadButton.addEventListener("click", () => { | |
</ResponseField> | ||
<ResponseField name="onComplete" type="function"> | ||
Callback function that fires when a user completes an import. It returns `data`, an object that contains the row data | ||
and information about the import such as the number of rows. The number of rows returned is limited to 10,000. If | ||
there are more than 10,000 rows, an `error` will be set and the data should be retrieved using the | ||
[API](/api-reference/get-import-rows). | ||
Callback function that fires when a user completes an import. It returns `data`, an object that contains the row data, | ||
column definitions, and other information about the import. | ||
<Info>The number of rows included is limited to 10,000. If there are more than 10,000 rows, an `error` will be set and | ||
the data should be retrieved using the [API](/api-reference/get-import-rows).</Info> | ||
```jsx | ||
onComplete={(data) => console.log(data)} | ||
``` | ||
Example `data`: | ||
```json | ||
{ | ||
"id": "170f9ae1-c109-4e26-83a1-b31f2baa81b2", | ||
"upload_id": "4f7ec0b5-16ef-4d0e-8b6a-0c182815a131", | ||
"id": "da5554e3-6c87-41b2-9366-5449a2f15b53", | ||
"importer_id": "a0fadb1d-9888-4fcb-b185-25b984bcb227", | ||
"num_rows": 4, | ||
"num_columns": 4, | ||
"num_processed_values": 16, | ||
"num_rows": 2, | ||
"num_columns": 3, | ||
"num_processed_values": 5, | ||
"metadata": { | ||
"user_id": 1234, | ||
"user_email": "test@example.com", | ||
"environment": "dev" | ||
"user_id": 1234, | ||
"user_email": "user@example.com", | ||
"environment": "staging" | ||
}, | ||
"is_stored": true, | ||
"has_errors": false, | ||
"num_error_rows": 0, | ||
"num_valid_rows": 4, | ||
"created_at": 1698172312, | ||
"error": null, | ||
"columns": [ | ||
{ | ||
"data_type": "number", | ||
"key": "age", | ||
"name": "Age" | ||
}, | ||
{ | ||
"data_type": "string", | ||
"key": "email", | ||
"name": "Email" | ||
}, | ||
{ | ||
"data_type": "string", | ||
"key": "first_name", | ||
"name": "First Name" | ||
} | ||
], | ||
"rows": [ | ||
{ | ||
"index": 0, | ||
"values": { | ||
"age": "23", | ||
"age": 23, | ||
"email": "[email protected]", | ||
"first_name": "Maria", | ||
"last_name": "Martinez" | ||
"first_name": "Maria" | ||
} | ||
}, | ||
{ | ||
"index": 1, | ||
"values": { | ||
"age": "32", | ||
"age": 32, | ||
"email": "[email protected]", | ||
"first_name": "Robert", | ||
"last_name": "Jones" | ||
} | ||
}, | ||
{ | ||
"index": 2, | ||
"values": { | ||
"age": "30", | ||
"email": "[email protected]", | ||
"first_name": "Mary", | ||
"last_name": "Zhang" | ||
} | ||
}, | ||
{ | ||
"index": 3, | ||
"values": { | ||
"age": "24", | ||
"email": "[email protected]", | ||
"first_name": "Jamie", | ||
"last_name": "Miller" | ||
"first_name": "Robert" | ||
} | ||
} | ||
] | ||
|
Oops, something went wrong.