> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gov.br MCMV as a data source

> Bring the Minha Casa Minha Vida open datasets to your Lakehouse.

Minha Casa Minha Vida (MCMV) is the Brazilian federal housing program. The Ministry of
Cities publishes open datasets about the program — subsidized housing developments and
FGTS-financed contracts — as public CSV files, refreshed roughly every quarter. Nekt
extracts these files directly from the official gov.br open-data page: no account or
credentials are required.

The published file names change on every release, so the connector automatically
discovers the current files from the government landing page on each run. Each release
is a full snapshot of the program data.

## Configuring Gov.br MCMV as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Gov.br MCMV option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

No credentials are required — the data is public. All settings are optional and only
exist as workarounds in case the government restructures its website:

* **Landing page URL**: (Optional, advanced) The gov.br page that lists the current MCMV data files. Defaults to the official page.

* **Subsidized developments file URL / FGTS synthetic file URL / FGTS analytical file URL**: (Optional, advanced) Direct file URLs that bypass the automatic discovery for each stream. Leave empty under normal circumstances.

* **User agent**: (Optional, advanced) The User-Agent header sent to gov.br. The default mimics a browser, which the government servers require.

* **Request timeout**: (Optional, advanced) Read timeout in seconds for each HTTP request. Defaults to 300.

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.

<Note>The `fgts_detalhado` stream is a large file (\~1.4 GB of CSV data, millions of rows — one per financing contract). Select it only if you need contract-level detail; the `fgts_sintetico` stream covers the same universe aggregated by municipality and year.</Note>

> 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**: use FULL\_TABLE for all streams — every release is a complete snapshot of the program data, so each extraction replaces the previous state.

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](https://docs.nekt.com/get-started/core-concepts/triggers), consider how often you want data to be extracted from this source. The government refreshes these datasets roughly every quarter, so a weekly or monthly trigger is more than enough.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find all available data streams from Gov.br MCMV and their corresponding fields. Field names follow the official SNH data dictionary, normalized to ASCII snake\_case.

<AccordionGroup>
  <Accordion title="Subsidiado Empreendimentos">
    Housing developments contracted under the subsidized (OGU) MCMV track — one row per development. Full table.

    **Key Fields:**

    * `data_referencia` - Reference date of the data snapshot
    * `cod_ibge` - 6-digit IBGE code of the municipality
    * `txt_nome_municipio` / `txt_sigla_uf` / `txt_regiao` - Municipality, state and macro-region
    * `dt_assinatura` - Contract signature date of the development
    * `cod_operacao` - Code of the operation associated with the development
    * `txt_nome_empreendimento` - Name of the housing development
    * `txt_nome_agente_financeiro` - Financial agent responsible for the development (e.g. CAIXA)
    * `txt_modalidade` - MCMV management modality (FAR, Entidades, Oferta Pública, Rural)
    * `txt_situacao_empreendimento` - Status (Concluído, Não Concluído, Distratado/Cancelado)
    * `qtd_uh` / `qtd_uh_entregues` / `qtd_uh_vigentes` / `qtd_uh_distratadas` - Housing units contracted, delivered, pending and terminated
    * `val_contratado_total` / `val_desembolsado` - Contracted and disbursed amounts in BRL
    * `txt_cnpj_construtora_entidade` / `txt_nome_construtora_entidade` - Construction company or social entity
    * `txt_endereco` / `txt_cep` - Address and postal code of the development
  </Accordion>

  <Accordion title="FGTS Sintético">
    FGTS-financed MCMV contracts aggregated by municipality and contract-signature year. Full table.

    **Key Fields:**

    * `data_referencia` - Reference date of the data snapshot
    * `cod_ibge` - 6-digit IBGE code of the municipality
    * `txt_municipio` / `txt_uf` - Municipality and state
    * `num_ano_financiamento` - Year in which the financing contracts were signed
    * `qtd_uh_financiadas` - Number of housing units contracted
    * `vlr_financiamento` - Total amount in BRL of the credit operations
    * `vlr_subsidio` - Total amount in BRL of subsidies granted by the OGU or FGTS
  </Accordion>

  <Accordion title="FGTS Detalhado">
    FGTS/FS-financed MCMV contracts — one row per financing contract. Large stream (millions of rows). Full table.

    **Key Fields:**

    * `data_referencia` - Reference date of the data snapshot
    * `cod_ibge` / `txt_municipio` / `mcmv_fgts_txt_uf` / `txt_regiao` - Municipality, state and macro-region
    * `data_assinatura_financiamento` - Signature date of the financing contract
    * `qtd_uh_financiadas` - Number of housing units contracted
    * `vlr_financiamento` - Amount in BRL of the credit operation
    * `vlr_subsidio_desconto_fgts` / `vlr_subsidio_desconto_ogu` - Subsidies that reduce the financed amount
    * `vlr_subsidio_equilibrio_fgts` / `vlr_subsidio_equilibrio_ogu` - Subsidies that lower the interest rate
    * `vlr_compra` - Asking price in BRL of the property
    * `vlr_renda_familiar` - Family income in BRL of the borrower
    * `txt_programa_fgts` - FGTS program under which the funds were applied
    * `num_taxa_juros` - Initial interest rate of the loan (percentage)
    * `txt_tipo_imovel` - Whether the property is new or used
    * `bln_cotista` - Whether the borrower holds an FGTS account (S/N)
    * `txt_sistema_amortizacao` - Amortization system (price, sac, sacre)
    * `dte_nascimento` - Birth date of the beneficiary
    * `txt_compatibilidade_faixa_renda` - MCMV income bracket of the beneficiary
    * `txt_nome_empreendimento` - Name of the housing development, when available
  </Accordion>
</AccordionGroup>
