Skip to main content
Granatum Financeiro is a Brazilian online financial management platform for small and mid-sized companies: accounts payable and receivable, bank accounts and cash flow, charges (boleto, credit card and PIX), budgets and financial reports. This source brings your Granatum financial entries, deleted entries, charges, registers, budgets and audit log into your Lakehouse.

Configuring Granatum as a Source

In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Granatum option from the list of connectors. Click Next and you’ll be prompted to add your access.

1. Add account access

Only a Super admin user of your Granatum account can see the API token. Ask a Super admin to copy it for you if you don’t have that profile.
To get your token, open Granatum and go to Configurações → Minha Empresa, then open API in the side menu. Copy the access token shown there. The following configurations are available:
  • Access Token: The token you copied from the Granatum API screen. It identifies one company, so create one source per Granatum company you want to extract. If the token is regenerated in Granatum, update it here.
  • Start Date: The earliest date to sync. Financial entries created or changed since this date, charges due since this date, and deleted entries and audit-log actions since this date are extracted.
  • Account ID: (Optional, advanced) The ID of your Granatum account. It is only used to read the audit log (logs). Leave it empty unless a run asks for it.
Once you’re done, click Next.

2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.
Tip: The stream can be found more easily by typing its name.
Select the streams and click Next.

3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.
  • Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
  • Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
  • Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
  • Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
    • Incremental: every time the extraction happens, we’ll get only the new data, which is good if, for example, you want to keep every record ever fetched.
    • Full table: every time the extraction happens, we’ll get the current state of the data, which is good if, for example, you don’t want to have deleted data in your catalog.
Entries, Deleted entries and Audit log support INCREMENTAL, which is the recommended sync type for them: only what changed since the last run is read, and entries that are paid or edited later are updated in your table. Every other stream is always read in full.
Once you are done configuring, click Next.

4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Optionally, you can define some additional settings:
  • Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
  • Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.
Once you are ready, click Next to finalize the setup.

5. Check your new source

You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.
For you to be able to see it on your Catalog, you need at least one successful source run.

Good to know

  • Deleted entries are flagged, not removed. When an entry is deleted in Granatum, the next run updates its row in Entries with excluido = true. Filter WHERE NOT excluido to work only with live entries.
  • Composite entries. If Granatum does not list the items of a composite entry (lançamento composto) as entries of their own, they are added to Entries from their parent, with parent_lancamento_id set, so totals by category include them.
  • Paid and settled entries are updated. When an entry is paid, received or edited in Granatum, the next run brings its new version. As a safety net, every incremental run also re-reads the entries due or paid in the last 30 days.
  • Audit log needs an administrator. Granatum only shows the audit log to administrators. If the token cannot read it, the Audit log table is skipped with a warning in the run log and the other tables keep syncing.
  • Amounts keep their sign. In Entries, expenses are negative and income is positive, exactly as in Granatum.
  • Dates and times. Dates are stored as YYYY-MM-DD. Timestamps (modified, data_hora) are in Granatum’s local time and carry no time zone.
  • Lists become JSON. Tags, attachments, the items of a composite entry and the changes recorded in the audit log are stored as JSON text, so the table structure never changes as those lists grow.
  • Rate limit. Granatum allows 100 requests per minute and 200 every 5 minutes. The source paces itself below that; if another integration uses the same token heavily, runs take longer.

Streams and Fields

Below you’ll find all available data streams from Granatum and their corresponding fields:
Accounts payable and receivable and transfers between accounts, of every bank account. Incremental on modified: an entry that is paid, received or edited is read again. Each incremental run also re-reads the entries due (open) or paid (settled) in the last 30 days, so a settlement is never missed. Entries deleted in Granatum are kept with excluido = true: filter WHERE NOT excluido for the live entries.Primary key: idSync: INCREMENTAL on modifiedFields:
  • id - Unique identifier of the entry (lançamento) in Granatum
  • descricao - Description of the entry
  • valor - Amount of the entry; negative for expenses (despesas) and positive for income (receitas)
  • tipo_lancamento_id - Granatum entry type identifier
  • conta_id - Bank account of the entry (see the contas table)
  • categoria_id - Category of the entry (see the categorias table)
  • centro_custo_lucro_id - Cost/profit center of the entry (see the centros_custo_lucro table)
  • forma_pagamento_id - Payment method (see the formas_pagamento table)
  • pessoa_id - Customer (income) or supplier (expense) of the entry (see the clientes and fornecedores tables)
  • tipo_documento_id - Fiscal document type (see the tipos_documento_fiscal table)
  • documento - Document number
  • tipo_custo_nivel_producao_id - Cost behaviour type (see the tipos_custo_nivel_producao table)
  • tipo_custo_apropriacao_produto_id - Cost allocation type (see the tipos_custo_apropriacao_produto table)
  • data_vencimento - Due date of the entry
  • data_pagamento - Payment (settlement) date; empty while the entry is open, filled once it is paid or received
  • data_competencia - Accrual date (data de competência): when the service was provided or the product sold
  • observacao - Free-text notes of the entry
  • pagamento_automatico - Whether Granatum settles the entry automatically on its due date
  • grupo_id - Repetition group: entries of the same recurring series share it
  • numero_repeticao - Installment number of the entry within its repetition group
  • total_repeticoes - Number of installments of the repetition group
  • periodicidade - Repetition frequency: D7 weekly, D15 fortnightly, M1 monthly, M2 bimonthly, M3 quarterly, M6 half-yearly, M12 yearly
  • lancamento_composto_id - Groups the items of a composite entry (lançamento composto)
  • lancamento_transferencia_id - For a transfer between accounts: the paired entry on the other account
  • pedido_id - Order identifier linked to the entry
  • identificador_externo - Identifier of the entry in another system
  • modified - When the entry was created or last changed in Granatum (Granatum local time, no time zone); incremental replication key
  • tags - Tags of the entry (list of tag ids, see the tags table) (JSON)
  • anexos - Attachments of the entry (list of attachment ids) (JSON)
  • itens_adicionais - Items of a composite entry, as returned with it (JSON)
  • excluido - True when the entry was deleted in Granatum (read from its list of deleted entries); the row is kept with this flag so the deletion reaches your table. Filter WHERE NOT excluido for live entries
  • excluido_visto_em - For a deleted entry: when this sync read it from Granatum’s list of deleted entries (UTC); empty otherwise
  • parent_lancamento_id - Set only on rows built from the itens_adicionais of a composite entry when Granatum does not list those items as entries of their own: the entry the item came from (dates, account and person are copied from it)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Entries deleted in Granatum, on their own. The same entries are also flagged with excluido = true in Entries, so you only need this table if you want the list of deletions.Primary key: idSync: INCREMENTAL on seen_deleted_atFields:
  • id - Unique identifier of the entry (lançamento) in Granatum
  • descricao - Description of the entry
  • valor - Amount of the entry; negative for expenses (despesas) and positive for income (receitas)
  • tipo_lancamento_id - Granatum entry type identifier
  • conta_id - Bank account of the entry (see the contas table)
  • categoria_id - Category of the entry (see the categorias table)
  • centro_custo_lucro_id - Cost/profit center of the entry (see the centros_custo_lucro table)
  • forma_pagamento_id - Payment method (see the formas_pagamento table)
  • pessoa_id - Customer (income) or supplier (expense) of the entry (see the clientes and fornecedores tables)
  • tipo_documento_id - Fiscal document type (see the tipos_documento_fiscal table)
  • documento - Document number
  • tipo_custo_nivel_producao_id - Cost behaviour type (see the tipos_custo_nivel_producao table)
  • tipo_custo_apropriacao_produto_id - Cost allocation type (see the tipos_custo_apropriacao_produto table)
  • data_vencimento - Due date of the entry
  • data_pagamento - Payment (settlement) date; empty while the entry is open, filled once it is paid or received
  • data_competencia - Accrual date (data de competência): when the service was provided or the product sold
  • observacao - Free-text notes of the entry
  • pagamento_automatico - Whether Granatum settles the entry automatically on its due date
  • grupo_id - Repetition group: entries of the same recurring series share it
  • numero_repeticao - Installment number of the entry within its repetition group
  • total_repeticoes - Number of installments of the repetition group
  • periodicidade - Repetition frequency: D7 weekly, D15 fortnightly, M1 monthly, M2 bimonthly, M3 quarterly, M6 half-yearly, M12 yearly
  • lancamento_composto_id - Groups the items of a composite entry (lançamento composto)
  • lancamento_transferencia_id - For a transfer between accounts: the paired entry on the other account
  • pedido_id - Order identifier linked to the entry
  • identificador_externo - Identifier of the entry in another system
  • modified - When the entry was created or last changed in Granatum (Granatum local time, no time zone); incremental replication key
  • tags - Tags of the entry (list of tag ids, see the tags table) (JSON)
  • anexos - Attachments of the entry (list of attachment ids) (JSON)
  • itens_adicionais - Items of a composite entry, as returned with it (JSON)
  • seen_deleted_at - When this sync last read the entry from Granatum’s list of deleted entries (UTC); incremental replication key
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Boleto, credit card and PIX charges issued through Granatum, due on or after the Start Date. Read in full on every run, because a charge changes status after it is issued.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the charge (cobrança) in Granatum
  • valor - Amount charged
  • valor_taxa - Fee charged for the payment method (negative)
  • percentual_multa - Late-payment fine percentage
  • cobrar_juros - Whether interest is charged after the due date
  • valor_multa_juros - Fine and interest paid on top of the amount
  • valor_pago - Amount actually paid; empty while unpaid
  • instrucoes_boleto - Instructions printed on the boleto
  • permitir_segunda_via - Whether a second copy of the boleto may be issued
  • lancamento_ids - Entries created for this charge (comma-separated entry ids, see the lancamentos table)
  • forma_pagamento_id - Payment method (see the formas_pagamento table)
  • cliente_id - Customer charged (see the clientes table)
  • conta_id - Bank account that receives the payment (see the contas table)
  • email - Email the charge was sent to
  • data_vencimento - Due date of the charge
  • data_a_transferir - When the paid amount became due for transfer to the account
  • data_transferindo - When the transfer of the paid amount started
  • data_transferido - When the paid amount was transferred to the account
  • data_cancelamento - When the charge was cancelled
  • status_id - Status identifier of the charge
  • status_descricao - Status of the charge (scheduled, pending, paid by customer, transferring, transferred…)
  • cobranca_hash - Hash that identifies the charge
  • link_publico - Public payment link of the charge
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Bank accounts, with the current balance on the day of the sync.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the bank account (conta bancária) in Granatum
  • descricao - Name of the bank account
  • permite_lancamento - Whether entries can be posted to this account
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • saldo - Current balance of the account, as Granatum shows it on the day of the sync
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
The chart of accounts. The hierarchy is flattened: every category is one row, with its parent_id and depth (nivel).Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the category (plano de contas) in Granatum
  • descricao - Name (description) of the record
  • cor - Color shown in Granatum (hex)
  • parent_id - Parent category in the hierarchy (0 or empty for a top-level category)
  • nivel - Depth of the category in the hierarchy as returned by Granatum (0 = top level)
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • tipo_categoria_id - Category type: 0 = mixed, 1 = expense (despesa), 2 = income (receita)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Cost and profit centers, hierarchy flattened as in categories.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the cost/profit center in Granatum
  • descricao - Name (description) of the record
  • parent_id - Parent cost/profit center in the hierarchy (empty for a top-level one)
  • nivel - Depth of the cost/profit center in the hierarchy as returned by Granatum (0 = top level)
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Customers, active and inactive. id matches pessoa_id of income entries.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the customer in Granatum (pessoa_id of income entries)
  • nome - Legal name (razão social) or full name
  • nome_fantasia - Trade name (nome fantasia)
  • documento - CNPJ or CPF, without mask
  • inscricao_estadual - State registration (inscrição estadual)
  • inscricao_municipal - Municipal registration (inscrição municipal)
  • telefone - Phone number
  • email - Email address
  • endereco - Street address
  • endereco_numero - Address number
  • endereco_complemento - Address complement
  • bairro - Neighborhood (bairro)
  • cep - Postal code (CEP)
  • cidade_id - City identifier (see the cidades table)
  • estado_id - State identifier (see the estados table)
  • cidade - City as returned by Granatum (JSON)
  • estado - State as returned by Granatum (JSON)
  • observacao - Free-text notes
  • cliente - Whether the person is registered as a customer
  • fornecedor - Whether the person is registered as a supplier
  • banco_id - Bank of the person’s bank account (see the bancos table)
  • agencia - Branch (agência) of the person’s bank account
  • numero_conta - Number of the person’s bank account
  • chave_pix - PIX key
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • classificacao_cliente_id - Customer classification (see the classificacoes table)
  • classificacao_fornecedor_id - Supplier classification (see the classificacoes table)
  • estrangeiro - Whether the person is foreign (no Brazilian document)
  • identificador_externo - Identifier of the person in another system
  • anexos - Attachments of the person (list of attachment ids) (JSON)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Suppliers, active and inactive. id matches pessoa_id of expense entries.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the supplier in Granatum (pessoa_id of expense entries)
  • nome - Legal name (razão social) or full name
  • nome_fantasia - Trade name (nome fantasia)
  • documento - CNPJ or CPF, without mask
  • inscricao_estadual - State registration (inscrição estadual)
  • inscricao_municipal - Municipal registration (inscrição municipal)
  • telefone - Phone number
  • email - Email address
  • endereco - Street address
  • endereco_numero - Address number
  • endereco_complemento - Address complement
  • bairro - Neighborhood (bairro)
  • cep - Postal code (CEP)
  • cidade_id - City identifier (see the cidades table)
  • estado_id - State identifier (see the estados table)
  • cidade - City as returned by Granatum (JSON)
  • estado - State as returned by Granatum (JSON)
  • observacao - Free-text notes
  • cliente - Whether the person is registered as a customer
  • fornecedor - Whether the person is registered as a supplier
  • banco_id - Bank of the person’s bank account (see the bancos table)
  • agencia - Branch (agência) of the person’s bank account
  • numero_conta - Number of the person’s bank account
  • chave_pix - PIX key
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • classificacao_cliente_id - Customer classification (see the classificacoes table)
  • classificacao_fornecedor_id - Supplier classification (see the classificacoes table)
  • estrangeiro - Whether the person is foreign (no Brazilian document)
  • identificador_externo - Identifier of the person in another system
  • anexos - Attachments of the person (list of attachment ids) (JSON)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Customer and supplier classifications.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the classification in Granatum
  • nome - Name of the classification
  • tipo_classificacao_id - Classification type: 0 = mixed, 1 = customer, 2 = supplier
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Payment methods.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the payment method in Granatum
  • descricao - Name (description) of the record
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Fiscal document types (invoice, receipt…).Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the fiscal document type (invoice, receipt…) in Granatum
  • descricao - Name (description) of the record
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Fixed or variable cost.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the cost behaviour type (fixed, variable)
  • descricao - Name (description) of the record
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Direct or indirect cost.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the cost allocation type (direct, indirect)
  • descricao - Name (description) of the record
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Tags that can be attached to entries.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the tag in Granatum
  • descricao - Name (description) of the record
  • ativo - Whether the record is active; inactive records are kept so old entries can still be joined to them
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Brazilian states.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the Brazilian state in Granatum
  • sigla - State abbreviation (UF)
  • nome - State name
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Cities, read state by state.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the city in Granatum
  • nome - City name
  • estado_id - State of the city (see the estados table)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Banks known to Granatum.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the bank in Granatum
  • nome - Bank name
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Users of the Granatum account.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the Granatum user
  • nome - User name
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Budgets configured in the account.Primary key: idSync: FULL_TABLEFields:
  • id - Unique identifier of the budget (orçamento) in Granatum
  • nome - Name of the budget
  • regime - Which date of the entries the budget compares: caixa (due date while open, payment date once settled) or competencia (accrual date)
  • data_inicio - First day of the budget period
  • data_fim - Last day of the budget period
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
The Granatum budget screen as a table: one row per budget, section (income or expenses), category and month, with the budgeted amount (previsto), the actual amount (realizado) and the difference. Monthly columns only; totals are sums of these rows.Primary key: orcamento_id, secao, categoria_id, periodoSync: FULL_TABLEFields:
  • orcamento_id - Budget (see the orcamentos table)
  • secao - Section of the budget: receitas (income) or despesas (expenses)
  • categoria_id - Category of the row (see the categorias table)
  • categoria_descricao - Name of the category
  • categoria_parent_id - Parent category (0 for a top-level category)
  • categoria_nivel - Depth of the category in the budget (0 = top level); parent rows already include their children
  • categoria_tem_filhas - Whether the category has child categories (its amounts include theirs)
  • categoria_cor - Color of the category (hex)
  • periodo - Period key as Granatum returns it (YYYY-M for months)
  • periodo_rotulo - Period label as shown in Granatum (MM/YYYY)
  • periodo_inicio - First day of the period
  • periodo_fim - Last day of the period
  • periodo_status - Whether the period is realizado (settled), previsto (only open entries) or realizado_previsto (both)
  • previsto - Budgeted amount for the category in the period (the Orçamento column)
  • realizado - Sum of the entries of the category in the period, paid and unpaid (the Realizado/Previsto column)
  • diferenca - realizado minus previsto, as computed by Granatum
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)
Every action done in Granatum (add, edit, delete, pay, receive), with who did it and what changed. Incremental on data_hora. Granatum shows it only to administrators: if the token cannot read it, this table is skipped and the others keep syncing.Primary key: idSync: INCREMENTAL on data_horaFields:
  • id - Unique identifier of the log entry
  • data_hora - When the action happened (Granatum local time, no time zone); incremental replication key
  • action - Action recorded in the database: add, edit or delete
  • acao_tipo - Action as Granatum interprets it (add, edit, delete, pay, receive…)
  • acao_descricao - Action in Portuguese (adicionou, editou, excluiu, pagou, recebeu…)
  • model - Kind of record affected (e.g. Lancamento)
  • title - Title or description of the affected record
  • usuario_id - User who performed the action (see the usuarios table)
  • usuario_nome - Name of the user who performed the action
  • lancamento_id - Entry related to the log (see the lancamentos table)
  • conta_id - Bank account related to the log (see the contas table)
  • cliente_id - Customer or supplier related to the log
  • alteracoes - Changed fields with their old and new values (JSON)
  • alteracoes_formatadas - Changed fields with labels and values formatted for display (JSON)
  • extra_fields - Fields Granatum returned that this connector does not map to a column yet, keyed by their original names (JSON)