Skip to content

Commit c203f99

Browse files
committed
param page size
1 parent 364c82a commit c203f99

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

submission-snapshot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ List of supported environement variables:
102102
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
103103
| `SOURCES__API_BEARER_TOKEN` | Bearer token for Submission API |
104104
| `SOURCES__BASE_URL` | Base URL for Submission API |
105+
| `SOURCES__PAGE_SIZE` | Page size for paginated Submission API requests |
105106
| `DESTINATION__FILESYSTEM__BUCKET_URL` | S3 bucket URL |
106107
| `DESTINATION__FILESYSTEM__LAYOUT` | [DLT files layout](https://dlthub.com/docs/dlt-ecosystem/destinations/filesystem#files-layout) |
107108
| `DESTINATION__FILESYSTEM__CREDENTIALS__ENDPOINT_URL` | S3 service endpoint URL |

submission-snapshot/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@dlt.source(max_table_nesting=0, parallelized=True)
1010
def submission_source(
11-
api_bearer_token: str = dlt.secrets.value, base_url: str = dlt.secrets.value
11+
api_bearer_token: str = dlt.secrets.value, base_url: str = dlt.secrets.value, page_size: int = dlt.secrets.value
1212
):
1313
config: RESTAPIConfig = {
1414
"client": {
@@ -37,7 +37,7 @@ def submission_source(
3737
},
3838
# Only store the "records" JSON, ignore pagination
3939
"data_selector": "records",
40-
"params": {"pageSize": 500},
40+
"params": {"pageSize": page_size},
4141
},
4242
# Includes the Category.id and Category.studyId in all records for filtering downstream
4343
"include_from_parent": ["id", "studyId"],

0 commit comments

Comments
 (0)