Import PVPC electricity prices from ESIOS api and save them in postgres
1.1K
This repository contains a script to download PVPC electrity prices from ESIOS using its API and store this data in a Postgres database using Prisma.
This repository has a Dockerfile to build a Docker image that can be dowloaded from Docker Hub.
Two env variables are required, one for Prisma for database connection, the other one to identify our requests for the API:
ALTER USER username CREATEDB; so the database is created in the first run.You can run this script using npm start or you can run it using Docker:
docker run --env DATABASE_URL="postgresql://user:password@your_db_server_or_hostname:5432/your_db_name?schema=public" --env ESIOS_KEY="your_esios_key" sologitops/pvpc-to-postgres
Each time you execute this command, records older than today will be deleted from the database.
Content type
Image
Digest
sha256:380ad5807…
Size
79.1 MB
Last updated
over 2 years ago
docker pull sologitops/pvpc-to-postgres