Skip to content

Commit

Permalink
update .py scripts to ingestion data
Browse files Browse the repository at this point in the history
  • Loading branch information
matbragan committed Jun 24, 2024
1 parent 4043807 commit d16b168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions airflow/plugins/download.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import logging
from io import BytesIO
from zipfile import ZipFile
Expand Down Expand Up @@ -35,6 +36,7 @@ def download_and_unzip(base_url: str, file: str) -> None:
except Exception as e:
msg = f'{file} - {e}'
log.error(msg)
sys.exit(1)


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions airflow/plugins/settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
BASE_URL = 'https://dados.ancine.gov.br/dados-abertos/'

FILE_TABLES = {
# 'bilheteria-diaria-obras-por-distribuidoras-csv.zip': 'bilheteria',
'crt-obras-nao-publicitarias-csv.zip': 'obras_crt',
'obras-nao-pub-brasileiras-csv.zip': 'obras_brasileiras',
'obras-nao-pub-estrangeiras-csv.zip': 'obras_estrangeiras',
# 'salas-de-exibicao-e-complexos.csv'
# 'bilheteria-diaria-obras-por-exibidoras-csv.zip': 'bilheteria_exibidoras',
# 'bilheteria-diaria-obras-por-distribuidoras-csv.zip': 'bilheteria_distribuidoras',
}

0 comments on commit d16b168

Please sign in to comment.