none
Copy (Export/Import) data in a U-SQL table between different U-SQL databases

    Question

  • So I have two U-SQL databases, Test and Prod, in Data Lake Analytics.  In the Test database I have created a table and populated it with data (via a stored procedure I issued a CREATE TABLE command then INSERT INTO to populate).

    Now I need to copy/export the data from the table in database Test to database Prod. 

    I have tried an Export of Table and Data following this page:  https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-data-lake-tools-export-database

    However, even if I click the checkbox to Import to local I still do not get any data (and yes the table has data).

    So how do I migrate data that resides in U-SQL database Tables?  I'm at a loss...

    **One additional item:  my two ADLA resources are in two different Azure Active Directories, test and prod.


    Bill Blakey


    Friday, November 16, 2018 10:07 PM

Answers

All replies

  • Hello Bill,

    Would exporting your data to an intermediate file work for you:

    https://docs.microsoft.com/en-us/u-sql/concepts/files/output-to-files

    Do you have requirements that exclude this option?
    Wednesday, November 21, 2018 5:44 PM
    Moderator
  • Just to wrap this up, I did have to "manually":

    1. export my table data via the Portal UI; I wrote the files to ADLS in a specific folder that I created
    2. wrote a U-SQL script which issues a "USE dbname;" first for the new/target database, followed by a CREATE TABLE followed by an EXTRACT ... FROM ... USING to create the tables and load each file.

    Just a process that seems begging for a Portal or Data Migration tool/utility.


    Bill Blakey

    Monday, November 26, 2018 10:07 PM