-
Notifications
You must be signed in to change notification settings - Fork 4
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 #149 from teamclairvoyant/staging
Staging
- Loading branch information
Showing
102 changed files
with
1,828 additions
and
267 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -10,4 +10,3 @@ target | |
|
||
docs/build | ||
.idea | ||
.bsp |
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,4 @@ | ||
version = "3.7.12" | ||
version = "3.7.15" | ||
maxColumn = 120 | ||
importSelectors = singleLine | ||
|
||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.9.3 | ||
sbt.version=1.9.6 |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Next Page URL Based Pagination | ||
|
||
In this pagination mechanism, the api returns the link or URL to the next page for the subsequent dataset from API: | ||
|
||
```json | ||
{ | ||
"next": "/v1/affiliates/2", | ||
"data": [ | ||
{ | ||
"col_A": "val_1", | ||
"col_B": "val_2", | ||
"col_C": "val_3" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
In the above response, the link to the next page is represented by `next`. This value will be used in the subsequent request like: `http://localhost:8080/v1/affiliates/2` | ||
|
||
This pagination details can be captured in the checkpoint file in the below manner: | ||
|
||
```hocon | ||
pagination = { | ||
type = "NextPageURLBasedPagination" | ||
next-url-attribute = "$.next" | ||
} | ||
``` | ||
|
||
The `next-url-attribute` is represented as [JsonPath](https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html). | ||
|
||
The complete example of checkpoint file including pagination is: | ||
|
||
```hocon | ||
name = "checkpoint_next_page_url_based_pagination" | ||
data = { | ||
data-request = { | ||
url = "http://localhost:8080/next-page-url-based-pagination" | ||
} | ||
data-response = { | ||
body = { | ||
type = "Text" | ||
text-format = { | ||
type = "JSONTextFormat" | ||
data-column-name = "data" | ||
} | ||
} | ||
pagination = { | ||
type = "NextPageURLBasedPagination" | ||
next-url-attribute = "$.next" | ||
} | ||
persistence = { | ||
type = "LocalFileSystem" | ||
file-format = { | ||
type = "ParquetFileFormat" | ||
} | ||
file-path = "/tmp/pagination" | ||
} | ||
} | ||
} | ||
``` |
Oops, something went wrong.