Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasmueller/franklin-fragment-converter
A converter for content fragments to SQL
https://github.com/thomasmueller/franklin-fragment-converter
Last synced: 15 days ago
JSON representation
A converter for content fragments to SQL
- Host: GitHub
- URL: https://github.com/thomasmueller/franklin-fragment-converter
- Owner: thomasmueller
- Created: 2022-12-06T11:01:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T07:32:46.000Z (almost 2 years ago)
- Last Synced: 2024-10-16T20:45:22.261Z (28 days ago)
- Language: Java
- Size: 85 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# franklin-fragment-converter
A converter for content fragments stored in Apache Jackrabbit Oak to a relational database.
Currently supported databases are PostgreSQL and SQLite, or, for testing purposes, creation of a SQL script.
## Build
mvn clean install
## Running
The following will convert the fragments defines in the file `fragments.json`
and store the SQL statements in the file `sql.txt` (at most 1000 lines):java -cp "target/*:target/lib/*" \
com.adobe.franklin.fragments.converter.ConvertFragmentsToSQL \
--fileName fragments.json \
--maxRows 1000 \
> sql.txtTo directly run all statements against a SQL database:
java -cp "target/*:target/lib/*" \
com.adobe.franklin.fragments.converter.ConvertFragmentsToSQL \
--fileName fragments.json \
--jdbcUrl jdbc:postgresql:test \
--jdbcUser testTo extract from a local segment store and populate a database:
java -cp "target/*:target/lib/*" \
com.adobe.franklin.fragments.converter.ConvertFragmentsToSQL \
--oakRepo crx-quickstart/repository \
--jdbcUrl jdbc:postgresql:test \
--jdbcUser test
To populate a SQLite database:java -cp "target/*:target/lib/*" \
com.adobe.franklin.fragments.converter.ConvertFragmentsToSQL \
--oakRepo crx-quickstart/repository \
--jdbcUrl jdbc:sqlite:test.sqlite \
--jdbcUser test