Skip to main content

%DeepSee.Component.deepseeCSVProvider

Class %DeepSee.Component.deepseeCSVProvider Extends %ZEN.Component.component [ System = 3 ]

This class is responsible for creating a CSV file from the contents of a DeepSee ResultSet

Parameters

INCLUDEFILES

Parameter INCLUDEFILES = "zenCSLM.js";

NAMESPACE

Parameter NAMESPACE = "http://www.intersystems.com/deepsee";

This is the XML namespace used for library components.

DOMAIN

Parameter DOMAIN = "%DeepSee";

Methods

%DrawHTML

Method %DrawHTML()

This class does not project HTML into its containing document

GetSystemTempDir

ClassMethod GetSystemTempDir() As %String

Return the temp directory for this system.

ScopeFileName

ClassMethod ScopeFileName(rawName As %String) As %String [ ZenMethod ]

Given a user specified file name clip it to ensure that it only refers to files in the mgr/temp space

RemoveFile

ClassMethod RemoveFile(pFileName) As %Status

Remove a temporary file used for this provider within this session from the mgr/Temp directory

ExportCSV

ClassMethod ExportCSV(pMDX = "", pFileName As %String = "", pParmsJSON As %String = "", Output pStatus As %Status) As %String [ ZenMethod ]

Export the results of an MDX query to pFileName. Parameters can be passed from the client in a serialized JSON string that will be deserialized into a DynamicObject

%CreateResultSet

ClassMethod %CreateResultSet(pMDX = "", Output pStatus As %Status, ByRef pParmsObj = {{}}, ByRef pVars = "") As %DeepSee.ResultSet [ Internal ]

Create a resultset from MDX query text. Failure results in a null resultset being returned.

%EmitNameValueTable

ClassMethod %EmitNameValueTable(pFileStream, pNames As %DynamicArray = {[]}, pValues As %DynamicArray = {[]}, pTableTitle = "", pParamsObj = {{}}) As %Status

Write a set of name-value pairs as stored in two arrays to a pFileStream in CSV format.

%EmitResultSet

ClassMethod %EmitResultSet(pRS As %DeepSee.ResultSet = {$$$NULLOREF}, pFileStream) As %Status [ Internal ]

Write the contents of the active resultset into the open file stream.

%EmitListingResultSet

ClassMethod %EmitListingResultSet(pRS = {$$$NULLOREF}, pFileStream) As %Status [ Internal ]

Emit the CSV for the content of a DRILLTROUGH query

%EmitKpiResult

ClassMethod %EmitKpiResult(pParamsObj = {{}}, pFileStream) As %Status

Emit the CSV for the content of a KPI

GetKpiFilterCaption

ClassMethod GetKpiFilterCaption(pKPIName, pSpec) As %String [ ZenMethod ]

Lookup a filter caption for a KPI

exportMDXToCSV

ClientMethod exportMDXToCSV(mdx, params, fileName) [ Language = javascript ]

Client-facing utility method to send an MDX query to the server to be exported as a CSV.

prepareTableParms

ClientMethod prepareTableParms(table) [ Language = javascript ]

Receive a pivotTable component and use its settings to produce a set of expected export parameters consistent with usage in this provider.

downloadCSV

ClientMethod downloadCSV(mdx, exportParams) [ Language = javascript ]

Package the entire generation of the download stream into a single convenient call for client consumption.