public class JsonDatasetConnector extends BaseDataSetConnector implements DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
DEFAULT_IMPORT
APP, COMMAND, ETL_DRIVER, FORMATTER, IDE_NODE, NO_RANK, WIDGET
Constructor and Description |
---|
JsonDatasetConnector() |
Modifier and Type | Method and Description |
---|---|
static String |
asString(DataSet dataSet,
Driver driver)
Convert data set to the json object and return a json string.
|
boolean |
canRead()
Checks if connector can read data.
|
boolean |
canWrite()
Checks if connector can write data.
|
void |
cleanUp(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Cleans up after DataSetConnector populated or persisted DataSet.
|
JsonDatasetConnectorParams |
getDataSetConnectorParams()
Gets the DataSetConnectorParams.
|
String |
getDisplayName()
Gets the display name.
|
String |
getExt()
Gets the file ext.
|
String |
getName()
Gets the name.
|
String |
getVendor()
Gets the vendor.
|
String |
getVersion()
Gets the version of the extension module.
|
String |
getXmlConfigFileName()
Gets the path to the xml configuration file for the module.
|
String |
initQueryLabel()
The init query label.
|
void |
inlinePersist(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver,
DataSetRecord record,
int row,
int records)
Persists data set row.
|
boolean |
isFileConnector()
Checks if this is a connector to the file based data source.
|
boolean |
isTextFormat()
Checks if this is a connector for the text-based data format, such as
JOSN, XML, etc.
|
ConnectorResult |
persist(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Persists data set.
|
ConnectorResult |
populate(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Populates data set.
|
void |
postPersist(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector finished persisting data set.
|
void |
prePersist(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector starts persisting data set.
|
boolean |
supportsNested()
Supports nested.
|
boolean |
supportsReadStreaming()
Supports read streaming.
|
boolean |
supportsWriteStreaming()
Supports write streaming.
|
ConnectorResult |
writeMetaData(JsonDatasetConnectorParams params,
DataSet dataSet,
Driver driver)
Writes meta data.
|
addValue, basePostPersist, getCommitPolicy, getInputStream, getIoProcessor, getLicensePropertyName, getReader, getType, postPersistWhenEmpty, setCommitPolicy, stream, supportsWorksheets, testConnection
compareTo, getConfigFileName, getExtensionRank, getIconPath, getLocalUnitClassPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportsReordering, supportsWorksheets, testConnection
public static String asString(DataSet dataSet, Driver driver) throws Exception
dataSet
- the data setdriver
- the etl driverException
- in case of any errorpublic boolean canRead()
DataSetConnector
canRead
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public boolean canWrite()
DataSetConnector
canWrite
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public void cleanUp(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
cleanUp
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic JsonDatasetConnectorParams getDataSetConnectorParams()
DataSetConnector
getDataSetConnectorParams
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public String getDisplayName()
ExtensionModule
getDisplayName
in interface ExtensionModule
public String getExt()
BaseDataSetConnector
getExt
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
getExt
in class BaseDataSetConnector
public String getName()
DataSetConnector
getName
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public String getVendor()
ExtensionModule
getVendor
in interface ExtensionModule
public String getVersion()
ExtensionModule
getVersion
in interface ExtensionModule
public String getXmlConfigFileName()
ExtensionModule
getXmlConfigFileName
in interface ExtensionModule
getXmlConfigFileName
in class BaseExtension
public void inlinePersist(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver, DataSetRecord record, int row, int records) throws Exception
DataSetConnector
inlinePersist
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverrecord
- the recordrow
- the rowrecords
- the total number of recordsException
- in case of any errorpublic boolean isFileConnector()
DataSetConnector
isFileConnector
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public boolean isTextFormat()
DataSetConnector
isTextFormat
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public ConnectorResult persist(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
persist
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic ConnectorResult populate(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
populate
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic void postPersist(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
postPersist
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic void prePersist(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
prePersist
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic ConnectorResult writeMetaData(JsonDatasetConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
writeMetaData
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic String initQueryLabel()
DataSetConnector
initQueryLabel
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public boolean supportsReadStreaming()
DataSetConnector
supportsReadStreaming
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public boolean supportsWriteStreaming()
DataSetConnector
supportsWriteStreaming
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
public boolean supportsNested()
DataSetConnector
supportsNested
in interface DataSetConnector<JsonDatasetConnectorParams,ConnectorResult>
Copyright © 2010-2020 Toolsverse. All Rights Reserved.