Generate multiple parallelizable SQL files (#839)

Generate multiple SQL files to be imported in parallel.
The files will respect the cross-layer dependencies,
so they can be all ingested at the same time.
pull/879/head
Yuri Astrakhan 2020-05-18 14:26:51 -04:00 zatwierdzone przez GitHub
rodzic d8095e8ee9
commit e12f09ae57
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -88,7 +88,7 @@ help:
.PHONY: init-dirs .PHONY: init-dirs
init-dirs: init-dirs:
@mkdir -p build @mkdir -p build/sql
@mkdir -p data @mkdir -p data
@mkdir -p cache @mkdir -p cache
@ -101,7 +101,7 @@ build/mapping.yaml: init-dirs
.PHONY: build-sql .PHONY: build-sql
build-sql: init-dirs build-sql: init-dirs
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-sql openmaptiles.yaml > build/tileset.sql $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-sql openmaptiles.yaml --dir ./build/sql
.PHONY: clean .PHONY: clean
clean: clean:

Wyświetl plik

@ -41,7 +41,7 @@ services:
volumes: volumes:
- .:/tileset - .:/tileset
- ./data:/import - ./data:/import
- ./build:/sql - ./build/sql:/sql
- ./build:/mapping - ./build:/mapping
- ./cache:/cache - ./cache:/cache

Wyświetl plik

@ -201,7 +201,7 @@ make clean
echo " " echo " "
echo "-------------------------------------------------------------------------------------" echo "-------------------------------------------------------------------------------------"
echo "====> : Code generating from the layer definitions ( ./build/mapping.yaml; ./build/tileset.sql )" echo "====> : Code generating from the layer definitions ( ./build/mapping.yaml; ./build/sql/* )"
echo " : The tool source code: https://github.com/openmaptiles/openmaptiles-tools " echo " : The tool source code: https://github.com/openmaptiles/openmaptiles-tools "
echo " : But we generate the tm2source, Imposm mappings and SQL functions from the layer definitions! " echo " : But we generate the tm2source, Imposm mappings and SQL functions from the layer definitions! "
make all make all