docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  Using InterSystems SQL

Using InterSystems SQL
Importing and Exporting SQL Data
Previous section          
InterSystems: The power behind what matters   
Search:  


In the InterSystems IRIS Data Platform™ Management Portal, there are tools for importing and exporting data:
These tools use Dynamic SQL, which means that queries are prepared and executed at runtime. The maximum size of a row that can be imported or exported is 3,641,144 characters.
You can also import data using the %SQL.Import.Mgr class, and export data using the %SQL.Export.Mgr class.
Importing Data from a Text File
You can import data from a text file into a suitable InterSystems IRIS class. When you do so, the system creates and saves new rows in the table for that class. The class must already exist and must be compiled. To import data into this class:
  1. From the Management Portal select System Explorer, then SQL. Select a namespace with the Switch option at the top of the page; this displays the list of available namespaces.
  2. At the top of the page, click the Wizards drop-down list, and select Data Import.
  3. On the first page of the wizard, start by specifying the location of the external file. For The import file resides on, click the name of the server to use.
  4. Then enter the complete path and filename of the file.
  5. For Select schema name, click the InterSystems IRIS package into which you want to import the data.
  6. For Select table name, click the class that will contain the newly created objects.
  7. Then click Next.
  8. On the second page of the wizard, click the columns that will contain the imported data.
  9. Then click Next.
  10. On the third page of the wizard, describe the format of the external file.
  11. Click Next.
  12. Review your entries and click Finish. The wizard displays the Data Import Result dialog box.
  13. Click Close. Or click the given link to view the background tasks page.
    In either case, the wizard starts a background task to do the work.
Exporting Data to a Text File
You can export data for a given class to a text file. To do so:
  1. From the Management Portal select System Explorer, then SQL. Select a namespace with the Switch option at the top of the page; this displays the list of available namespaces.
  2. At the top of the page, click the Wizards drop-down list, and select Data Export.
  3. On the first page of the wizard:
    Then click Next.
  4. On the second page of the wizard, select which columns to export. Then click Next.
  5. On the third page of the wizard, describe the format of the external file.
    Then click Next.
  6. Review your entries and click Finish. The wizard displays the Data Export Result dialog box.
  7. Click Close. Or click the given link to view the background tasks page.
    In either case, the wizard starts a background task to do the work.


Previous section          
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-09-20 05:47:55