Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Commit

Permalink
Merge branch 'uom' of https://github.com/52North/data-transloader int…
Browse files Browse the repository at this point in the history
…o uom

* 'uom' of https://github.com/52North/data-transloader:
  Markdown lint
  Fix for docker-archive/compose-cli#1856
  Minor changes
  • Loading branch information
autermann committed Mar 6, 2023
2 parents 154a555 + be71fb1 commit b6979c7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions DOCKER.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ There is currently no official Docker image on Docker Hub. Please build a Docker
## Building the Image

```terminal
$ docker build -t data-transloader:latest .
docker build -t data-transloader:latest .
```

## Running a Container

To test that the container runs:

```terminal
$ docker run -it --rm data-transloader:latest
docker run -it --rm data-transloader:latest
```

This should print the "help" information for the tool. We use `--rm` to delete the container after running, as it is an ephemeral one-time run.

To run the tool in actual usage, a Docker volume should be used to store the data and metadata. ([A bind mount][binds] to the host filesystem may also be used.)

```terminal
$ docker volume create etl-data
docker volume create etl-data
```

The tool can then be ran with the usual parameters; be sure to mount the volume so that the metadata is re-used.
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.get-and-put-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ x-defaults:
--station_id "$${STATION_ID}" \
--database_url "file://$${DATA_DIR}" \
--overwrite
# customize the metadata
ruby transload set metadata \
--provider data_garrison \
Expand Down Expand Up @@ -257,5 +257,5 @@ volumes:

networks:
sta:
external:
name: sta_default
name: uom-frost_default
external: true
6 changes: 3 additions & 3 deletions docker-compose.get-and-put-observations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ x-defaults:
networks:
- sta
restart: unless-stopped
environment:
environment:
# the STA endpoint to load data to
STA_URL: http://sta:8080/FROST-Server/v1.0/
# the moving window to download data for (optional, defaults to 2 days)
Expand Down Expand Up @@ -122,5 +122,5 @@ volumes:

networks:
sta:
external:
name: sta_default
name: uom-frost_default
external: true
2 changes: 1 addition & 1 deletion docker/cron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker run -d -e STA_URL="..." -e SCHEDULE="@hourly" -e MOVING_WINDOW="1 day" \

The build has to be done in the root directory of this repository:

```
```shell
docker build -t data-transloader-job:latest -f docker/cron/Dockerfile .
```

Expand Down
4 changes: 2 additions & 2 deletions lib/ontologies/README.markdown
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Ontologies

The [RDF][] ontology files in this directory provide semantic mappings for metadata from the data providers into a standard vocabulary of entities for SensorThings API.
The [RDF] ontology files in this directory provide semantic mappings for metadata from the data providers into a standard vocabulary of entities for SensorThings API.

Observed Properties from a provider are namespaced and matched to a single Unit of Measurement and Observed Property. A class in the Data Transloader Ruby library will provide an API for looking up these mappings.

[RDF]: https://en.wikipedia.org/wiki/Resource_Description_Framework

### Example
## Example

The source data provider `Data Garrison` provides observations for a sensor with the property `Pressure` and units `mbar`. This maps to the RDF Individual `DataGarrison:Pressure`. Properties are namespaced by their provider in case different providers use the same names.

Expand Down
4 changes: 2 additions & 2 deletions start-sequentially.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ COMPOSE_FILE="docker-compose.get-and-put-metadata.yaml"

yq -r '.services | keys | .[]' "${COMPOSE_FILE}" | \
while read service; do
docker-compose -f "${COMPOSE_FILE}" up "$service"
done
docker compose -f "${COMPOSE_FILE}" up "$service"
done

0 comments on commit b6979c7

Please sign in to comment.