JS API for the CSV API Service

Hierarchy

  • CsvApiService

Constructors

Properties

NAME: string

The name of the CSV API Service. Used by the client for the name in the variable descriptor when calling getObject from the core connection.

TYPE: string

The type of the CSV API Service. Used by the client for the type in the variable descriptor when calling getObject from the core connection.

Methods

  • Get a preview table for a CSV import source.

    Parameters

    • schemaXml: string

      the schema as an xml string

    • importSourceName: string

      the import source name

    • partitionFormula: string

      the partition formula

    • intradayPartitionColumn: string

      the intraday partition column

    • trim: boolean

      if the parser should trim

    • noHeader: boolean

      if there is no header in the file

    • delimiter: string

      if there is no header in the file

    • skipLines: number

      number of lines to skip

    • skipFooterLines: number

      number of footer lines to skip

    • fileFormat: string

      optional file format, if null this creates a default format

    • constant: string

      the constant

    • strict: boolean

      if the parser should use strict mode

    • partitionSubstitution: string

      the partition substitution

    • substitutionDateFormat: string

      the substitution date format

    • sourceFile: string

      the source file

    • sourceGlob: string

      the source glob

    • sourceDirectory: string

      the source directory

    Returns Promise<Table>

    a promise that resolves to a table

  • Infers a schema from a csv file located at the path on the server.

    Parameters

    • path: string

      the path of the CSV file

    • namespace: string

      the schema namespace

    • tableName: string

      the schema tableName

    • importSourceName: string

      the import source name

    • bestFit: boolean

      if the parser should best fit columns

    • fileFormat: string

      optional file format, if blank this create a default format

    • delimiter: string

      optional delimiter to use, ignored if blank

    • skipHeaderLines: number

      number of header lines to skip

    • skipFooterLines: number

      number of footer lines to skip

    • trim: boolean

      if the parser should trim

    • noHeader: boolean

      if there is no header in the file

    • maxRows: number

      the max number of rows to read

    • partitionColumn: string

      the partition column

    • columnNames: string[]

      column names if noHeader is set

    Returns Promise<string>

    a promise that resolves to a string

  • Infers a schema from a string containing csv.

    Parameters

    • csvString: string

      a string containing csv

    • namespace: string

      the schema namespace

    • tableName: string

      the schema tableName

    • importSourceName: string

      the import source name

    • bestFit: boolean

      if the parser should best fit columns

    • fileFormat: string

      optional file format, if blank this create a default format

    • delimiter: string

      optional delimiter to use, ignored if blank

    • skipHeaderLines: number

      number of header lines to skip

    • skipFooterLines: number

      number of footer lines to skip

    • trim: boolean

      if the parser should trim

    • noHeader: boolean

      if there is no header in the file

    • maxRows: number

      the max number of rows to read

    • partitionColumn: string

      the partition column

    • columnNames: string[]

      column names if noHeader is set

    Returns Promise<string>

    a promise that resolves to a string

  • Creates a table from a csv file located at the path on the server.

    Parameters

    • path: string

      the path of the CSV file

    • fileFormat: string

      optional file format, if blank this create a default format

    • delimiter: string

      optional delimiter to use, ignored if blank

    • skipHeaderLines: number

      number of header lines to skip

    • skipFooterLines: number

      number of footer lines to skip

    • trim: boolean

      if the parser should trim

    • noHeader: boolean

      if there is no header in the file

    • maxRows: number

      the max number of rows to read

    Returns Promise<Table>

    a promise that resolves to a table

  • Creates a table from a string containing csv.

    Parameters

    • csvString: string

      the path of the CSV file

    • fileFormat: string

      optional file format, if blank this create a default format

    • delimiter: string

      optional delimiter to use, ignored if blank

    • skipHeaderLines: number

      number of header lines to skip

    • skipFooterLines: number

      number of footer lines to skip

    • trim: boolean

      if the parser should trim

    • noHeader: boolean

      if there is no header in the file

    • maxRows: number

      the max number of rows to read

    Returns Promise<Table>

    a promise that resolves to a table