Description of the component
Tool Info | Links |
---|---|
Original Tool | |
Current Tool Version | commit-hash |
odtp new odtp-component-entry \
--name odtp-postgis-dataloader \
--component-version v0.1.2 \
--repository https://github.com/odtp-org/odtp-postgis-dataloader
Parameter | Description | Default Value |
---|---|---|
HOST | PostgreSQL HOST | None |
PORT | PostgreSQL PORT | None |
DATABASE | PostgreSQL database to be queried | C |
QUERY | Query. Please wrap it between " : "QUERY" |
None |
OUTPUT_FILENAME | Output file name | output.csv |
GEOM_COL | Column where to find the geometry | geometry |
Secrets | Description | Default Value |
---|---|---|
LOGIN_USER | User in the PostgreSQL database | None |
PASSWORD | Password in the PostgreSQL database | None |
No input files are required.
File/Folder | Description |
---|---|
CSV File | CSV file containing the results from the QUERY |
Build the dockerfile with:
docker build -t odtp-postgis-dataloader .
Copy .env.dist
in .env
and fill the variables. Run the following command. Mount the correct volumes for input/output folders.
docker run -it --rm \
-v {PATH_TO_YOUR_INPUT_VOLUME}:/odtp/odtp-input \
-v {PATH_TO_YOUR_OUTPUT_VOLUME}:/odtp/odtp-output \
--env-file .env odtp-component
This command will create a test folder with the volumes to be mounted. If you are using Powershell, replace $(pwd)
by ${PWD}
.
mkdir test
mkdir test/odtp-input
mkdir test/odtp-output
mkdir test/odtp-logs
docker run -it --rm \
-v $(pwd)/test/odtp-input:/odtp/odtp-input \
-v $(pwd)/test/odtp-output:/odtp/odtp-output \
-v $(pwd)/test/odtp-logs:/odtp/odtp-logs \
-v $(pwd)/app:/odtp/odtp-app --env-file .env --entrypoint bash odtp-postgis-dataloader
Then in order to run the component, you can execute:
bash /odtp/odtp-component-client/startup.sh
Finally, when you are done, please remove the test folder.
rm -r test
-
v0.1.2
- Client updated to v0.1.2
- Github action for dockerhub publishing inlcuded
- Added fix when building on windows
-
v0.1.1
-
v0.1.0
- Ubuntu fixed at 22.04
- Python fixed at 3.10
CSFM & SDSC