📘 Obter Dados no Power BI
📘 Getting Data in Power BI
Este arquivo reúne o conteúdo essencial sobre conexão e importação de dados, conforme os requisitos da certificação PL-300.
This file gathers the essential content about data connection and import, according to the requirements of the PL-300 certification.
🔹 Tipos de Conexão
🔹 Types of Connection
1. Arquivos
1. Files
- Excel (.xlsx)
- Excel (.xlsx)
- CSV/TXT
- CSV/TXT
- JSON
- JSON
- XML
- XML
- Parquet
- Parquet
2. Bancos de Dados
2. Databases
- SQL Server
- SQL Server
- Oracle
- Oracle
- PostgreSQL
- PostgreSQL
- MySQL
- MySQL
- Azure SQL
- Azure SQL
- Fabric Lakehouse / Warehouse
- Fabric Lakehouse / Warehouse
3. Serviços Online
3. Online Services
- SharePoint
- SharePoint
- OneDrive
- OneDrive
- OData Feed
- OData Feed
- Microsoft Exchange
- Microsoft Exchange
- Dynamics 365
- Dynamics 365
- Dataverse
- Dataverse
4. Outros
4. Others
- Web scraping (Get data > Web)
- Web scraping (Get data > Web)
- APIs REST
- REST APIs
- Pastas ("Folder") para ingestão em lote
- Folders ("Folder") for batch ingestion
🔹 Import x DirectQuery x Live Connection
🔹 Import vs DirectQuery vs Live Connection
| Método |
Method |
Características |
Characteristics |
Quando usar |
When to use |
| Import |
Import |
Dados ficam no modelo |
Data remains in the model |
Melhor desempenho; datasets pequenos/médios |
Better performance; small/medium datasets |
| DirectQuery |
DirectQuery |
Dados permanecem na fonte |
Data remains at the source |
Dados muito grandes ou quase em tempo real |
Very large data or near real-time |
| Live Connection |
Live Connection |
Conexão com SSAS, Fabric ou Power BI semantic model |
Connection with SSAS, Fabric or Power BI semantic model |
Modelos centralizados, governança |
Centralized models, governance |
🔹 Conectando a pastas (Folder)
🔹 Connecting to folders (Folder)
Recurso útil para carregar múltiplos arquivos com a mesma estrutura. Passos:
Useful feature to load multiple files with the same structure. Steps:
- Get Data → Folder
- Get Data → Folder
- Combine & Transform
- Combine & Transform
- Aplicar filtros sobre metadados se necessário
- Apply filters on metadata if necessary
- Limpar e padronizar colunas
- Clean and standardize columns
🔹 Conexão com Web/API
🔹 Connection with Web/API
No Power BI Desktop:
In Power BI Desktop:
- Get Data → Web
- Get Data → Web
- Informar URL
- Enter URL
- Lidar com autenticação (Anonymous, Basic, OAuth)
- Handle authentication (Anonymous, Basic, OAuth)
- Converter JSON → tabelas
- Convert JSON → tables
🔹 Boas Práticas ao Obter Dados
🔹 Best Practices when Getting Data
- Sempre revisar tipos de dados
- Always review data types
- Evitar colunas desnecessárias
- Avoid unnecessary columns
- Centralizar parâmetros (URL, pastas, datas, tokens)
- Centralize parameters (URL, folders, dates, tokens)
- Utilizar Query folding sempre que possível
- Use Query folding whenever possible
- Documentar transformações importantes
- Document important transformations
📚 Links Oficiais
📚 Official Links
- Supported data sources:
https://learn.microsoft.com/power-bi/connect-data/desktop-data-sources
- Supported data sources:
https://learn.microsoft.com/power-bi/connect-data/desktop-data-sources
- DirectQuery:
https://learn.microsoft.com/power-bi/connect-data/desktop-directquery-about
- DirectQuery:
https://learn.microsoft.com/power-bi/connect-data/desktop-directquery-about