1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Autonomous Databaseへのグラフデータ投入

1
Posted at

はじめに

Autonomous Databaseにはグラフデータを分析、可視化可能なGarph Studioが含まれています。本記事では、Garph Studioを用いてグラフデータをAutonomous Databaseに投入し、可視化を行うまでのプロセスを備忘録として整理しました。

投入するグラフデータ

今回投入するグラフデータには以下のデータセットを使用しました。

こちらのデータには、日本百名山の情報がグラフ形式で登録されています。データの冒頭部分は、以下のようになっています。

@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix cc:  <http://creativecommons.org/ns#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix dbpedia: <http://ja.dbpedia.org/page/> .	
@prefix geonames: <https://geonames.jp/resource/> .	
@prefix iclt: <https://imilite.org/> .	
@prefix local: <https://linkingopendata.com/local/> .	
@prefix mtplan: <http://www-toralab.ics.nitech.ac.jp/mtplan.owl#> .	
<http://linkdata.org/resource/rdf1s4006i#Mountains_100_001>
      <http://www.w3.org/2000/01/rdf-schema#label> "Mountains_100_001"@ja ;
      mtplan:山名 "利尻岳"@ja ;
      iclt:カナ表記 "リシリダケ"@ja ;
      iclt:測地高度 "1721"^^xsd:int ;
      mtplan:山域 "利尻島"@ja ;
      iclt:都道府県 "北海道"@ja, geonames:北海道 ;
      local:指定 "日本百名山"@ja, dbpedia:日本百名山, "日本二百名山"@ja, dbpedia:日本二百名山, "日本三百名山"@ja, dbpedia:日本三百名山 ;
      iclt:備考 "利尻礼文サロベツ国立公園"@ja .

グラフデータの投入

Garph Studioでは、データ投入のためのジョブを作成可能です。このジョブを利用すると、プロファイルを用いてObject Storageにアクセスし、Object Storage上にあるグラフデータをAutonomous Databaseに投入可能です。
Garph Studioは、Autonomous Databaseの詳細画面にある「データベース・アクション」から「すべてのデータベース・アクションの表示」を選択し、左下にある「Graph Studio」を選択することでアクセスできます。

image.png

Garph Studioにアクセス後、画面左側でグラフを選択し、「グラフの作成」を押下することでジョブの作成が実行可能です。
image.png

作成するグラフタイプにRDFグラフを選択します。
image.png

次に、投入するデータのURIを指定します。このURIは、Object Stoarge上の対象データの「オブジェクト詳細の表示」から確認可能です。
Autonomous DatabaseがObject StorageにアクセスするためのプロファイルとObject Storageのグラフデータは事前に用意しておきました。
image.png

最後に作成するグラフの名称を入力し、「作成」を押下するとデータの投入が開始されます。
image.png

Data Studioのホーム画面から「ジョブ」を選択すると、先ほど実行したジョブのステータスが確認できます。本画面のようになっていると、グラフの作成が完了しています。
image.png

Data Studioのホーム画面左側でグラフを選択すると、先ほど作成したグラフがリストに表示されます。リストを選択してみると、画面下部に登録したデータが行形式で表示されます。
image.png

さらに、問合せプレイグラウンドから問い合わせを行うと、データの関係性が可視化されます。
image.png

最後に

Autonomous DatabaseのGraph Studioを用いることで、GUI操作により容易にグラフデータを投入、可視化が可能です。例えばグラフRAGを試す際にこの機能を用いることで、容易に検証が行えると考えられます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?