Forum

export large data s...
 
Notifications
Clear all

export large data set from power pivot or query

2 Posts
2 Users
0 Reactions
402 Views
(@chadwood32)
Posts: 5
Active Member
Topic starter
 

I have over 5,000,000 records i want to download so i can put in excel or csv and share data.   i have DX studio and it downlaoded one tab of data but only as much that can fit on one tab.  Is there a fairly quick way to export this data?  I am not a code writting expert i am just learning.  Thnak you. 

 
Posted : 28/04/2021 12:17 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Chad,
Instead of excel, use Power BI (which contains Power Query and Power Pivot tools)

If you install R language in Power BI, you can use a very simple R Script to export a query to csv:

write.csv(dataset,"e:\test.csv")

The query step looks like this:
RScript= R.Execute("write.csv(dataset,""e:\test.csv"")",[dataset=#"Changed Type"])

Or, whenever you want to save to xlsx, even to a defined table, you can use:

require(openxlsx)
write.xlsx(dataset,"e:\test.xlsx", asTable = TRUE)

asTable = FALSE will save to xlsx without creating a defined table.

In your case, write.csv is what you need.

 
Posted : 04/05/2021 12:08 am
Share: