# Power BI - SESSION 2 Connection # Overview ## Connection type There are really **3 main types** of connections. 1. **Import**: this is the most widely used, and is the default when connecting to most data sources. This connection will ingest or pull the data from the data source and become part of the PBI Desktop file. Maximum 1GB for free licence ![](https://i.imgur.com/kPA3Zpp.png) ![](https://i.imgur.com/SbPoTag.png) 2. **Direct Query**: connect directly to the data source No data is imported or copied into Power BI Desktop. For relational sources, the selected tables and columns appear in the Fields list. As you create or interact with a visualization, Power BI Desktop queries the underlying data source, so you’re always viewing current data. It can help you visualize with large data set (more than 1GB) [More information](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-use-directquery) ![](https://i.imgur.com/GW8rdiN.png) 3. **Live connection** It only connects to three types of data sources. This connection does not store a duplicate or secondary copy of the data in memory. Data will be stored in the data source, and Power BI visualizations will query the data source every time when needed. The three types of data sources supported by Power BI Live Connection are as follows: 1. SQL Server Analysis Services Multi-Dimensional 2. SQL Server Analysis Services Tabular 3. Power BI Service Dataset ![](https://i.imgur.com/MN0cRGi.png) ## [Data Source Support](https://docs.microsoft.com/en-us/power-bi/connect-data/power-bi-data-sources) # Hands-on connect to data source ## Import file **Step 1** Get data ![](https://i.imgur.com/BXmsPfZ.png) **Step 2** Choose "**FILE**" ![](https://i.imgur.com/J2OdRby.png) For each file type, we must configure the parameters before Load or Transform ## Import data from Database **Step 1** Choose connect to SQL server data base ![](https://i.imgur.com/W25vx39.png) **Step 2 ** Get server name in SSMS or Azure studio ![](https://i.imgur.com/7HdMoQe.png) ![](https://i.imgur.com/J3nWBYF.png) **Step 3 ** Choose table want to Load or Transform ![](https://i.imgur.com/rsFbutd.png) ## Import data from Web **Step 1** Choose URL want to get Data ![](https://i.imgur.com/6jbe6FO.png) I am want to get data from cophieu68.vn and get only stock code "FLC" to analysis. So I fill the heper link direct to FLC code. https://www.cophieu68.vn/snapshot.php?id=FLC ![](https://i.imgur.com/udyK1lo.png) **Step 2** Choose table want to Load or Transform ![](https://i.imgur.com/IV0jaD3.png) ## Direct query data from Data source ![](https://i.imgur.com/vunF6Qf.png) The result of query ![](https://i.imgur.com/1wxZapU.png)