AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
This is the syntax we will use to feed in some of the values that are related to our SQL server, like server name, database (where you want to fetch the data) and the table name (which you want to create a table with). We need our RODBC library on our system for this functionality to work.Īside from this, we need to define the connection to our SQL server. You may not have R installed on your system, but you need this library as a must to have before running this script. You can see that we are importing a library called RODBC. This is the script that we need to run within the Power BI desktop to create the table into the SQL server. In order to create this table, we are going to utilize a functionality known as R script and run this into our Power BI desktop. These fields we have identified will be loaded into our SQL server table. We’re going to choose some columns and create a table from there. Let’s choose some of these fields to load into the table. Now, out of these fields, we will be inserting some of this data into the SQL server table. Let’s just select this particular sheet to see a preview of the type of data we have, then click on Transform Data.Īs you can see, there are multiple fields over here. It has some data which we need to create a table in SQL server. We have this file called Test Data in Excel format. In order to begin, let’s connect to one of the data sources. We’ll connect to this SQL server using Power BI desktop R script, and create a table based out of our data model. You can see that under MyDB, we don’t have any table at this moment. We also have a SQL Server Management Studio opened over here. In order to demonstrate this functionality, I have already opened Power BI desktop over here, which we can connect to our test data. We encountered a situation where we had to pull data from Power BI desktop to SQL server and use R script. Today, I will talk about a cool feature of Power BI where you can fix your data from the Power BI desktop or Power BI web service to SQL server.
0 Comments
Read More
Leave a Reply. |