0

d2rq ユーティリティを使用して .ttl ファイルを作成し、それを MarkLofgic にインポートしましたが、目的の結果を得ることができませんでした。

さらに、私のデータは次のようになります。d2rq によって生成されたトリプル

MarkLogic の SPARQL でのクエリに使用する MySql データからトリプルを作成するにはどうすればよいですか。SOmeone は、主キーの値を件名、列名を述語、セルの値をオブジェクトとしてトリプルに変換することを検討すべきだと提案しましたが、どのように ? よろしくお願いします Swapneel GOLAPKAR

4

1 に答える 1

1

What you are showing there, are triples in the format that MarkLogic stores them in the database. Make sure to enable the triple index from Admin ui for that database to be able to use SPARQL on them.

Once enabled you can run commands like count(cts:triples()) from QConsole to see how many triples have been loaded, and run SPARQL from there as well.

You can also connect to the /v1/graphs/sparql REST endpoint.

Regarding how data should look as triples, given two sample records like below (expressed as XML for convenience):

<Drug_Dtl>
    <Drug_ID>D001</Drug_ID>
    <Drug_name>Glyburide 5 mg</Drug_name>
    <Brand_name>Diabeta</Brand_name>
    <Brand>Novo Nordisk</Brand>
    <strength>5 mg</strength>
    <NoOfPills>1</NoOfPills>
    <TotalDailyDose>5 mg</TotalDailyDose>
    <Cost>$51</Cost>
    <DailyPills>1</DailyPills>
</Drug_Dtl>

<Prescriber>
    <PrescriberId>PSC001</PrescriberId>
    <PrescriberName>Wa&#x200C;&#x200B;yne</PrescriberName>
    <Prescriber_Address>7 Elgar Center</Prescriber_Address>
    <City>Chicago</City>
    <State>Illinois</State>
</Prescriber>

I would expect triples similar to (expressed as turtle for convenience):

<D001> <Drug_name> "Glyburide 5 mg".
<D001> <Brand_name> "Diabeta".
<D001> <Brand> "Novo Nordisk".
<D001> <strength> "5 mg".
<D001> <NoOfPills> "1".
<D001> <TotalDailyDose> "5 mg".
<D001> <Cost> "$51".
<D001> <DailyPills> "1".

<PSC001> <PrescriberName> "Wa&#x200C;&#x200B;yne".
<PSC001> <Prescriber_Address> "7 Elgar Center".
<PSC001> <City> "Chicago".
<PSC001> <State> "Illinois".

HTH!

于 2015-07-09T09:16:56.420 に答える