RDF, Turtle 등 트리플 형식의 데이터를 저장하고 탐색하는 오픈소스 데이터베이스이다.
데이터를 업로드하고, Endpoint를 사용해 SPARQL 쿼리로 데이터를 탐색할 수 있다.
Release Blazegraph 2.1.6 Release Candidate · blazegraph/database
blazegraph 깃헙 페이지에서 다운로드 가능
Quick_Start · blazegraph/database Wiki
cd [blazegraph.jar가 존재하는 폴더]
java -server -Xmx16g -jar blazegraph.jar (or bigdata.jar)
-Xmx
옵션은 'set maximum Java heap size' (메모리) 힙사이즈의 최대를 결정해주는 옵션, 큰데이터를 올릴수록 크게 숫자설정이 필요함. 참고:https://sosal.kr/883
UPDATE
탭에 직접 업로드하거나, 파일경로를 입력할 수 있음.
주의! 대략 100메가 이상의 데이터는 직접 업로드 불가
Bulk_Data_Load · blazegraph/database Wiki
→ 공식 홈페이지 안내 : 문제는 .properties를 처음 접함
Loading triples into Blazegraph using the bulk data loader
→ fastload.properties
from the Blazegraph samples on GitHub, 에서 .properties 파일을 만들고 blazegraph.jar 파일이 있는 폴더에 저장함.
→ ~~~.file = blazegraph.jnl
추가해주어야함.
.properties 파일이란? → https://docu94.tistory.com/130
# This configuration turns off incremental inference for load and retract, so
# you must explicitly force these operations if you want to compute the closure
# of the knowledge base. Forcing the closure requires punching through the SAIL
# layer. Of course, if you are not using inference then this configuration is
# just the ticket and is quite fast.
# set the initial and maximum extent of the journal
com.bigdata.journal.AbstractJournal.initialExtent=209715200
com.bigdata.journal.AbstractJournal.maximumExtent=209715200
com.bigdata.journal.AbstractJournal.file=blazegraph.jnl
# turn off automatic inference in the SAIL
com.bigdata.rdf.sail.truthMaintenance=false
# don't store justification chains, meaning retraction requires full manual
# re-closure of the database
com.bigdata.rdf.store.AbstractTripleStore.justify=false
# turn off the statement identifiers feature for provenance
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false
# turn off the free text index
com.bigdata.rdf.store.AbstractTripleStore.textIndex=false
# RWStore (scalable single machine backend)
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
fastload.properties에 있는 함수는 여기를 참고하면 더 다양한 기능을 사용할 수 있을 것으로 예상함.
→https://blazegraph.com/database/apidocs/index.html
→https://blazegraph.com/database/apidocs/com/bigdata/journal/AbstractJournal.html
Error when loading a bulk .zip containing database · Issue #43 · blazegraph/database
→ 이분과 마찬가지로 .zip으로 넣으면 statement수가 나오지 않음. 즉 오류 발생.
→ .ttl을 직접 넣어주니 성공함.
❗❗ 주의: fastload.properties 실행 시, 반드시 blazegraph 끄고 실행할 것! ❗❗
java -cp blazegraph.jar com.bigdata.rdf.store.DataLoader -namespace [네임스페이스명] fastload.properties [파일경로 또는 폴더경로]