Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%Library] >  [SQLImportMgr]
Private  Storage   

class %Library.SQLImportMgr extends %RegisteredObject, %SQLExImData

Import Controller for SQL Import.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 3 14 1


Summary

Properties
ClassName ColumnNames ColumnTypes ColumnWidths DateFormat
DeferIndices Delimiter FileName HasHeaders NoCheck
StringQuote TableName UseTransaction

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
BuildIndices CloseImport DeleteImportRoutine ErrorCount
ErrorLogClose ErrorLogExecute ErrorLogFetch FileSize
GenerateImportRoutine Import ImportRows OpenImport
ReadHeader Reset ResetExImData


Parameters

• parameter RTNPREFIX = "SQLImport";

Properties

• property DeferIndices as %Integer [ InitialExpression = 1 ];
If true, generate indices after importing data.
• property UseTransaction as %Integer [ InitialExpression = 0 ];
If true, nest the entire import operation in a transaction.

NOT IMPLEMENTED.


Methods

• method BuildIndices() as %Status
Perform the merge sort to build the indices.
• method CloseImport(abort As %Integer = 0) as %Status
Call this at the end of the import operation.
• method DeleteImportRoutine() as %Status
Delete the generated import routine.
• method ErrorCount() as %Integer
Returns the current number of import errors.
• classmethod ErrorLogClose(QHandle As %Binary) as %Status
• classmethod ErrorLogExecute(ByRef QHandle As %Binary) as %Status
• classmethod ErrorLogFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• method FileSize() as %Integer
Returns the size of the import file.
• method GenerateImportRoutine() as %Status
Generate the Import routine.
• method Import(savertn As %Boolean = 0)
Do an import from the command line.
• method ImportRows(ByRef count As %Integer, ByRef inserted As %Integer, ByRef bytes As %Integer, ByRef done As %Integer, ByRef errorcount As %Integer) as %Status
Reads the next count rows from the import file.

On return, counts contains the number of rows read from the file. inserted contains the number of rows successfully inserted. bytes contains the number of bytes read from the file. done is set to one when the import is complete. errorcount is the cumulative number of INSERT errors encountered.

• method OpenImport() as %Status
Prepares the start of an import.

Call this after generating an import routine.

• method ReadHeader(ByRef header As %String, ByRef size As %Integer) as %Status
Reads the first line of the import file.
• method Reset()
Reset the state of this object.

Queries

• query ErrorLog()
Selects Type As %String, ErrorNo As %Integer, ErrorText As %String, Row As %Integer


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.