-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementação da funcionalidade de agregação de diários oficiais por …
…ano e município/estado (#78) Implementação da rotina de agregação, responsável por fazer a extração dos conteúdos txt de todos os diários oficiais de um município em um período de um ano e transformá-lo em um arquivo XML para compactação em formato ZIP e disponibilização no sistema de arquivos. Também responsável por juntar todos os arquivos XML de todos os municípios de um determinado estado em um período de um ano para agregação e compactação em formato ZIP para disponibilização no sistema de arquivos. Após as agregações e armazenagem dos arquivos ZIP, são disponibilizados meta dados dos arquivos no banco de dados para buscas otimizadas na API.
- Loading branch information
Showing
11 changed files
with
396 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from .interfaces import DatabaseInterface | ||
|
||
|
||
def create_aggregates_table(database: DatabaseInterface): | ||
database._commit_changes( | ||
""" | ||
CREATE TABLE IF NOT EXISTS aggregates ( | ||
id SERIAL PRIMARY KEY , | ||
territory_id VARCHAR, | ||
state_code VARCHAR NOT NULL, | ||
year INTEGER, | ||
file_path VARCHAR(255) UNIQUE, | ||
file_size_mb REAL, | ||
hash_info VARCHAR(64), | ||
last_updated TIMESTAMP | ||
); """) | ||
|
||
|
Oops, something went wrong.