Skip to main content

Class OneStreamSqlTabularLoader

A concrete implementation of Workspace.XBR.Xperiflow.Etl.Tabular.ITabularLoader that loads tabular data into a OneStream SQL Database. The OneStreamSqlTabularLoader uses a Workspace.XBR.Xperiflow.Etl.OneStreamSqlConnectionContext and Workspace.XBR.Xperiflow.Etl.TableDataContainerContext to create and load data into a SQL table.

Namespace: Workspace.XBR.Xperiflow.Etl.Tabular

Assembly: Xperiflow.dll

Declaration
public class OneStreamSqlTabularLoader : ITabularLoader, ILoader<IDataReader>

Implements: Workspace.XBR.Xperiflow.Etl.Tabular.ITabularLoader, Workspace.XBR.Xperiflow.Etl.ILoader<System.Data.IDataReader>

Methods​

GenerateCreateTableSql(IDataReader, string, Dictionary<string, string>?, string?)​

Creates an SQL Command to create a table based on the schema of the provided IDataReader and table name.

Declaration
public static string GenerateCreateTableSql(IDataReader dataReader, string tableName, Dictionary<string, string>? columnStringLengths = null, string? schemaName = null)
Returns​

System.String

A string containing the SQL Command to create the table

Parameters​
TypeNameDescription
System.Data.IDataReaderdataReaderThe IDataReader object used to define the table schema
System.StringtableNameThe table name only. Periods are literal table-name characters.
System.Collections.Generic.Dictionary<System.String,System.String>columnStringLengthsOptional string length overrides by column name. Values may be 1-4000 or MAX.
System.StringschemaNameOptional SQL schema name. Defaults to dbo when omitted.

Load(IDataReader)​

Writes the data from the provided IDataReader to the OneStream SQL Database.

Declaration
public void Load(IDataReader payload)
Remarks​

This method will throw an exception if the table already exists in the database

Parameters​
TypeNameDescription
System.Data.IDataReaderpayloadThe IDataReader object containing the data to write to the OneStream SQL Database

Implements​

Inherited Members​

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?