Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Scott_Powell
Advocate III
Advocate III

Easy way to copy Lakehouse tables into SQL DB?

Hi, just wondering if there's an easy way to copy tables from a Lakehouse into a SQL database? Pipeline copy activities don't seem to be able to write to a Fabric SQL database, and when I tried a gen2 dataflow it failed with an error.

 

Thanks,

Scott

4 REPLIES 4
divyed
Super User
Super User

Hello @Scott_Powell ,

 

Have you tried using staging before loading to destination ? I would suggest couple of things here :

 

1. Using staging before loading to a destination :    

2. Vacuuming your Lakehouse data destination : 

3. Handle Nullable columns

4. Data types conversion and upscaling

 

for detailed information check out below link :

Dataflow Gen2 data destinations and managed settings - Microsoft Fabric | Microsoft Learn

 

If you are using pipeline, you can check few things :

 

  • Check Data Movement Options: If you’re using Azure Data Factory (or the Fabric pipeline equivalent), you might want to experiment with different data movement strategies, like adjusting the copy behavior (e.g., batch size, partitioning). Sometimes splitting the data into chunks and processing those in parallel can dramatically speed things up.

  • Optimize Source and Destination Configurations:

    • Ensure that your source SQL database is optimized for querying (e.g., appropriate indexing, statistics up-to-date).
    • For the destination SQL database, ensure you have optimized tables (e.g., clustered indexes, proper data types).
  • Compression: Depending on the data you're moving, using compression can help reduce the time and network bandwidth needed for the transfer.

  • Staging Data: In some cases, copying the data first to a staging area (like Azure Blob storage) and then moving it to the destination database can improve performance, especially for large volumes of data.

  • Incremental Loads: If this is something you're doing regularly, setting up incremental data loads (only copying changed or new data) can speed up the overall process.

  • Monitor Throughput: Keep an eye on resource usage (CPU, memory, network) during the copy. Sometimes, bottlenecks can come from resource limits on the source, destination, or even on the pipeline itself.

 

 

Please try this once, I hope this will help.

 

Cheers

 

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/
Scott_Powell
Advocate III
Advocate III

Hi all, I was able to get this working with using a copy activity in a pipeline. The issue I originally had was, if I chose the destination connection as a SQL database, I couldn't figure out the right way to populate the connection fields that would work.

 

However, if I just chose the name of the Fabric SQL DB from the "OneLake" section - it prompted me to create a connection which worked perfectly.

 

The only thing I'll add is that this copy process is extremly slow...I'm not sure what's going on behind the scenes, but I've had some copy jobs running 3+ hours to move tables that have < 20 million rows. I'll need to find a much faster way of doing this.

 

Thanks for the assistance!

Scott

sukkaur
Microsoft Employee
Microsoft Employee

Hi @Scott_Powell - Here's a short demo on how to move lakehouse data to SQL database in Fabric - https://youtu.be/K8n_0ez31Oo . Please let me know if this is helpful.

Thanks

Sukhwant

dlevy
Microsoft Employee
Microsoft Employee

@Scott_Powell - Sorry to hear that!

 

For pipelines were you doing something like this https://learn.microsoft.com/en-us/fabric/database/sql/load-data-pipelines#create-data-pipeline? I'd expect it to work. You can't create a new connection yet in pipelines but you should be able to pick your database from the OneLake Data Hub.

 

Do you have an error you can share for data flows?

Helpful resources

Announcements
MarchFBCvideo - carousel

Fabric Monthly Update - March 2025

Check out the March 2025 Fabric update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

"); $(".slidesjs-pagination" ).prependTo(".pagination_sec"); $(".slidesjs-pagination" ).append("
"); $(".slidesjs-play.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-stop.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-pagination" ).append(""); $(".slidesjs-pagination" ).append(""); } catch(e){ } /* End: This code is added by iTalent as part of iTrack COMPL-455 */ $(".slidesjs-previous.slidesjs-navigation").attr('tabindex', '0'); $(".slidesjs-next.slidesjs-navigation").attr('tabindex', '0'); /* start: This code is added by iTalent as part of iTrack 1859082 */ $('.slidesjs-play.slidesjs-navigation').attr('id','playtitle'); $('.slidesjs-stop.slidesjs-navigation').attr('id','stoptitle'); $('.slidesjs-play.slidesjs-navigation').attr('role','tab'); $('.slidesjs-stop.slidesjs-navigation').attr('role','tab'); $('.slidesjs-play.slidesjs-navigation').attr('aria-describedby','tip1'); $('.slidesjs-stop.slidesjs-navigation').attr('aria-describedby','tip2'); /* End: This code is added by iTalent as part of iTrack 1859082 */ }); $(document).ready(function() { if($("#slides .item").length < 2 ) { /* Fixing Single Slide click issue (commented following code)*/ // $(".item").css("left","0px"); $(".item.slidesjs-slide").attr('style', 'left:0px !important'); $(".slidesjs-stop.slidesjs-navigation").trigger('click'); $(".slidesjs-previous").css("display", "none"); $(".slidesjs-next").css("display", "none"); } var items_length = $(".item.slidesjs-slide").length; $(".slidesjs-pagination-item > button").attr("aria-setsize",items_length); $(".slidesjs-next, .slidesjs-pagination-item button").attr("tabindex","-1"); $(".slidesjs-pagination-item button").attr("role", "tab"); $(".slidesjs-previous").attr("tabindex","-1"); $(".slidesjs-next").attr("aria-hidden","true"); $(".slidesjs-previous").attr("aria-hidden","true"); $(".slidesjs-next").attr("aria-label","Next"); $(".slidesjs-previous").attr("aria-label","Previous"); //$(".slidesjs-stop.slidesjs-navigation").attr("role","button"); //$(".slidesjs-play.slidesjs-navigation").attr("role","button"); $(".slidesjs-pagination").attr("role","tablist").attr("aria-busy","true"); $("li.slidesjs-pagination-item").attr("role","list"); $(".item.slidesjs-slide").attr("tabindex","-1"); $(".item.slidesjs-slide").attr("aria-label","item"); /*$(".slidesjs-stop.slidesjs-navigation").on('click', function() { var itemNumber = parseInt($('.slidesjs-pagination-item > a.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); });*/ $(".slidesjs-stop.slidesjs-navigation, .slidesjs-pagination-item > button").on('click keydown', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); var itemNumber = parseInt($('.slidesjs-pagination-item > button.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); }); $(".slidesjs-play.slidesjs-navigation").on('click', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); }); $(".slidesjs-pagination-item button").keyup(function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { e.preventDefault(); $(".slidesjs-stop.slidesjs-navigation").trigger('click').blur(); $("button.active").focus(); } }); $(".slidesjs-play").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-stop").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-play")) { $(".slidesjs-stop").focus(); } } }); $(".slidesjs-stop").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-play").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-stop")) { $(".slidesjs-play").focus(); } } }); $(".slidesjs-pagination-item").keydown(function(e){ switch (e.which){ case 37: //left arrow key $(".slidesjs-previous.slidesjs-navigation").trigger('click'); e.preventDefault(); break; case 39: //right arrow key $(".slidesjs-next.slidesjs-navigation").trigger('click'); e.preventDefault(); break; default: return; } $(".slidesjs-pagination-item button.active").focus(); }); }); // Start This code is added by iTalent as part of iTrack 1859082 $(document).ready(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); $("#tip2").attr("aria-hidden","true").addClass("hidden"); $(".slidesjs-stop.slidesjs-navigation, .slidesjs-play.slidesjs-navigation").attr('title', ''); $("a#playtitle").focus(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").mouseover(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").blur(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#playtitle").mouseleave(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#play").keydown(function(ev){ if (ev.which ==27) { $("#tip1").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); $("a#stoptitle").focus(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").mouseover(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").blur(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").mouseleave(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").keydown(function(ev){ if (ev.which ==27) { $("#tip2").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); }); // End This code is added by iTalent as part of iTrack 1859082
Top Solution Authors
Top Kudoed Authors