ローカルデータワークフロー
OLP CLI では、テストまたは開発の目的で、ローカルでのカタログの管理がサポートされています。 ローカルデータを管理するための次のようなツールが提供されます。
- アクセス権を持つすべてのカタログを一覧表示します。
- 新しいカタログとレイヤーを作成します。
- カタログにデータをアップロードします。
- プラットフォームでホストされているカタログをローカルカタログにコピーします。
詳細について は、ローカルカタログコマンドを参照してください。
注
ローカルカタログは、開発およびテストの目的でのみ使用できます。 ローカルカタログを使用してプロダクションユースケースを実行することは許可されていません。
すべてのローカルカタログを一覧表示します
ローカルマシンにあるローカルカタログを一覧表示するに olp local catalog list
は、コマンドを入力します。
olp local catalog list
このコマンドを使用すると、所有しているローカルカタログの HRNS が新しい行に一覧表示されます。
新しいローカルカタログとレイヤーを作成します
新しいローカルカタログおよびレイヤーを作成するには、次のステップを実行します。
olp local catalog create
コマンドを入力します。Linux窓olp local catalog create first-catalog-example-id first-catalog-example \ --summary "This catalog contains a sample layer containing data in CSV format" \ --description "A longer description of the catalog contents"
olp local catalog create first-catalog-example-id first-catalog-example ^ --summary "This catalog contains a sample layer containing data in CSV format" ^ --description "A longer description of the catalog contents"
ローカルカタログにレイヤーを追加するに
olp local catalog layer add
は、コマンドを入力します。Linux窓olp local catalog layer add hrn:local:data:::first-catalog-example-id example-layer-id \ "Example layer" --versioned --summary "This layer contains simple data in CSV format" \ --description "A longer description of the layer contents" --content-type=text/csv
olp local catalog layer add hrn:local:data:::first-catalog-example-id example-layer-id ^ "Example layer" --versioned --summary "This layer contains simple data in CSV format" ^ --description "A longer description of the layer contents" --content-type=text/csv
ローカルカタログの設定を確認するには
olp local catalog show
、コマンドを入力します。olp local catalog show hrn:local:data:::first-catalog-example-id --json
コマンドを実行すると、次の結果が表示されます。
{ "summary": "This catalog contains sample layers containing simple text", "owner": {}, "billingTags": [], "hrn": "hrn:local:data:::first-catalog-example-id", "created": "2018-03-26T12:48:10.315Z", "name": "first-catalog-example", "layers": [{ "summary": "This layer contains simple data in CSV format", "volume": { "volumeType": "durable" }, "layerType": "versioned", "billingTags": [], "name": "Example layer", "description": "A longer description of the layer contents", "partitioningScheme": "generic", "partitioning": { "scheme": "generic" }, "id": "example-layer-id", "contentType": "text/csv", "tags": [] }], "description": "", "notifications": { "enabled": false }, "id": "first-catalog-example-id", "version": -1, "tags": [] }
ローカルカタログにデータをアップロードします
次
partition-0.csv
の例のように、アップロードする詳細情報を含むファイルを作成します。City,Country Berlin,Germany Seattle,USA Chicago,USA Boston,USA
olp local catalog layer partition put
コマンドを入力します。Linux窓olp local catalog layer partition put hrn:local:data:::first-catalog-example-id \ example-layer-id --partitions testPart0:<path_to_file>/partition-0.csv
olp local catalog layer partition put hrn:local:data:::first-catalog-example-id ^ example-layer-id --partitions testPart0:<path_to_file>\partition-0.csv
コマンドを実行すると、次の結果が表示されます。
Uploading the files into partitions. 100% [=======================================] 1/1 (0:00:01 / 0:00:00) The data was successfully added to the partitions: [testPart0]
パーティション を確認するには
olp local catalog layer partition list
、コマンドを入力します。olp local catalog layer partition list hrn:local:data:::first-catalog-example-id example-layer-id
コンソールに次のテキストが表示されます。
partition size checksum testPart0 23 665d2817c51cbccd4312eb22699163c05b9d5a0a Total size: 23 B Use olp local catalog layer partition get <catalog HRN> <layer ID> to download partitions
partition-0.csv
からファイルを取得olpcli-example-catalog-id
するにはolp local catalog layer partition get
、コマンドを入力します。Linux窓olp local catalog layer partition get \ hrn:local:data:::first-catalog-example-id example-layer-id --partitions testPart0
olp local catalog layer partition get ^ hrn:local:data:::first-catalog-example-id example-layer-id --partitions testPart0
コンソールには
partition-0.csv
、ファイルに保存されているテキストが表示されます。City,Country Berlin,Germany Seattle,USA Chicago,USA Boston,USA
プラットフォームでホストされているカタログをローカルカタログにコピーします
バウンディング ボックスカタログの
topology-geometry
レイヤーおよびcartography
レイヤーからベルリン周辺の HERE Map Content をローカルカタログにコピーします。Linux窓olp local catalog copy create hrn:here:data::olp-here:rib-2 \ --include topology-geometry cartography \ --filter [heretile]=bounding-box:52.67551,52.33826,13.76116,13.08835 \ --id here-map-content
olp local catalog copy create hrn:here:data::olp-here:rib-2 ^ --include topology-geometry cartography ^ --filter [heretile]=bounding-box:52.67551,52.33826,13.76116,13.08835 ^ --id here-map-content
コンソールに次のテキストが表示されます。
state: skipped history: skipped address-locations: skipped building-footprints: skipped 3d-buildings: skipped cartography: 100% [=====] 44/44 (0:00:01 / 0:00:00) administrative-places: skipped road-traffic-pattern-attributes: skipped traffic-patterns: skipped street-names: skipped lane-attributes: skipped address-attributes: skipped adas-attributes: skipped road-attributes: skipped topology-geometry: 100% [=====] 45/45 (0:00:01 / 0:00:00) administrative-locations: skipped navigation-attributes: skipped advanced-navigation-attributes: skipped truck-attributes: skipped cartography-metadata: skipped building-metadata: skipped here-places: skipped places-metadata: skipped distance-markers: skipped indexed-locations: skipped sign-text: skipped environmental-zones: skipped here-places-essential-map: skipped landmarks-3d: skipped landmarks-2d: skipped vehicle-regulations: skipped flag-images: skipped postal-code-points: skipped postal-area-boundaries: skipped toll-cost: skipped electric-vehicle-charging-stations: skipped here-truck-service-locations: skipped here-fueling-stations: skipped generalized-junctions-signs: skipped annotations: skipped bicycle-attributes: skipped warning-locations: skipped complex-road-attributes: skipped recreational-vehicle-attributes: skipped administrative-place-profiles: skipped Completed sync up to version 5 Local catalog hrn:local:data:::here-map-content created
既存のローカルコピーをプラットフォームがホストするソースカタログと同期化します。
olp local catalog copy update hrn:local:data:::here-map-content
コンソールに次のテキストが表示されます。
Catalog configuration is up to date here-map-content: syncing version 6 state: skipped history: skipped address-locations: skipped building-footprints: skipped 3d-buildings: skipped cartography: 100% [=====] 3/3 (0:00:00 / 0:00:00) administrative-places: skipped road-traffic-pattern-attributes: skipped traffic-patterns: skipped street-names: skipped lane-attributes: skipped address-attributes: skipped adas-attributes: skipped road-attributes: skipped topology-geometry: 100% [=====] 9/9 (0:00:00 / 0:00:00) administrative-locations: skipped navigation-attributes: skipped advanced-navigation-attributes: skipped truck-attributes: skipped cartography-metadata: skipped building-metadata: skipped here-places: skipped places-metadata: skipped distance-markers: skipped indexed-locations: skipped sign-text: skipped environmental-zones: skipped here-places-essential-map: skipped landmarks-3d: skipped landmarks-2d: skipped vehicle-regulations: skipped flag-images: skipped postal-code-points: skipped postal-area-boundaries: skipped toll-cost: skipped electric-vehicle-charging-stations: skipped here-truck-service-locations: skipped here-fueling-stations: skipped generalized-junctions-signs: skipped annotations: skipped bicycle-attributes: skipped warning-locations: skipped complex-road-attributes: skipped recreational-vehicle-attributes: skipped administrative-place-profiles: skipped Completed sync up to version 6
使用可能なコマンドの完全なリストを取得するには、を入力
olp local --help
します。