-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
get_architecture_table_from_api retorna um dataframe (pd.DataFrame). Utilizo quando a tabela não tem uma arquitetura e preciso adicionar ela no dbt.
O fluxo é mais ou menos assim:
- Pego o dataframe usando
get_architecture_table_from_api - Salvo como csv e subo no Drive
- Pego o link do sheet e uso crio uma instancia da classe
TableArchitecture - Então gero o
schema.ymle o<file>.sql - Tenho que adicionar na mão a descrição da tabela
Isso pode ser simplificado:
get_architecture_table_from_apiretorna umTableArchitecture- Se a descrição da tabela estiver na Django podemos pegar
- Os métodos de
TableArchitectureestarão emget_architecture_table_from_api
Ainda precisa subir no Drive, mas não precisamos da url
Exemplo:
# pode ser uma lista no segundo param
arch = get_architecture_table_from_api("dataset_id", "table_id")
# para gerar o yml e o arquivo sql
arch.create_yaml_file()
arch.create_sql_files()Metadata
Metadata
Assignees
Labels
No labels