Updated to Patstat Version Fall 2023
This repository generates the PATSTAT Database using Object Relational Mapping (ORM) and Docker.
This allows for creation of PATSTAT for various databases:
- MySQL
- PostgreSQL
- SQLite
Under development
Sebastian Erhardt
The documentation of patstat can be found here .
SQL_HOST=localhost
SQL_USER=admin
SQL_PASSWORD=password
SQL_DATABASE=patstat
SQL_PORT=5432
SQL_TYPE=POSTGRES
These can be set in a .env
file in the root directory.
TODO:
go get -u github.com/max-planck-innovation-competition/go-patstat
- Download Patstat via EPO Bulk Data Download
- Set-Up Database Docker e.g. Postgres docker-compose.yml
- Move Patstat Data to Database Folder
- Unzip Patstat Data
# unzip part files
unzip *.zip
# unzip tls files
unzip tls*.zip
- Create
.env
file with following content
SQL_HOST=localhost
SQL_USER=postgres
SQL_PASSWORD=changeme
SQL_PORT=5432
SQL_DATABASE=patstat
SQL_TYPE=POSTGRES
- Build the binary
echo BUILD BINARY
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
go build -o patstat ./cmd/main.go
- Run Patstat installation Script
./patstat --mode=install --db=patstat_2023_fall --directory=./