上QQ阅读APP看书,第一时间看更新
SQL Server as a source
Another common source designed for relational databases is Microsoft SQL Server:
- To connect to SQL Server, select the Get Data button again, but this time choose SQL Server. Here, you must provide the server, but the database is optional and can be selected later:
- For the first time, you are asked to choose the type of Data Connectivity mode you would like. As mentioned previously, Import is the default mode, but you can optionally select DirectQuery. DirectQuery will be discussed in greater detail later in this chapter. Expanding the Advanced options provides a way to insert a SQL statement that may be used as your source. For the following example, in the server is the only one property populated before clicking OK:
- Next, you will be prompted to provide the credentials you are using to connect to the database server you provided on the previous screen.
- Click Connect after providing the proper credentials to launch the same Navigator dialog that you may remember from when you connected to Excel. Here, you will select the tables, views, or functions within your SQL Server database that you desire to import into your Power BI solution. Once again, the final step in this dialog allows you to choose to either Load or Edit the results.