Skip to content

Commit

Permalink
Set up initial Strapi export test workflow (RPB-59)
Browse files Browse the repository at this point in the history
Get Strapi data via HTTP API, transform with existing Fix file
  • Loading branch information
fsteeg committed Mar 12, 2024
1 parent a29ab60 commit 3213689
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ sbt "runMain rpb.ETL conf/rpb-test-titel-to-lobid.flux"

This writes individual `.json` files for each record in the input data to `output/`.

### Export strapi data

```bash
sbt "runMain rpb.ETL conf/test-export-strapi-to-lobid.flux"
```

This writes individual `.json` files for Strapi records to `output/`.

### Validate output

Expand Down
9 changes: 9 additions & 0 deletions conf/test-export-strapi-to-lobid.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"http://rpb-cms-test.lobid.org/api/articles?populate=*&pagination[pageSize]=5"
| open-http
| as-records
| decode-json(recordPath="data.[*].attributes")
| fix(FLUX_DIR + "rpb-titel-to-lobid.fix")
| batch-reset(batchsize="1")
| encode-json(prettyPrinting="true")
| write(FLUX_DIR + "output/test-strapi-to-lobid-output-${i}.json")
;

0 comments on commit 3213689

Please sign in to comment.