public class BulkAPI
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
BulkAPI(AnalyticsClient ac,
long orgId,
long workspaceId)
Creates a new
BulkAPI instance. |
Modifier and Type | Method and Description |
---|---|
void |
exportBulkData(long jobId,
java.io.OutputStream stream)
Download the exported data for the mentioned job id.
|
void |
exportBulkData(long jobId,
java.lang.String filePath)
Download the exported data for the mentioned job id.
|
void |
exportData(long viewId,
java.lang.String responseFormat,
java.io.OutputStream stream,
org.json.JSONObject config)
Export the mentioned table (or) view data.
|
void |
exportData(long viewId,
java.lang.String responseFormat,
java.lang.String filePath,
org.json.JSONObject config)
Export the mentioned table (or) view data.
|
org.json.JSONObject |
getExportJobDetails(long jobId)
Returns the details of the export job.
|
org.json.JSONObject |
getImportJobDetails(long jobId)
Returns the details of the import job.
|
long |
importBulkData(long viewId,
java.lang.String importType,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String filePath,
org.json.JSONObject config)
Asynchronously import the data contained in the mentioned file into the table.
|
long |
importBulkDataInNewTable(java.lang.String tableName,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String filePath,
org.json.JSONObject config)
Asynchronously create a new table and import the data contained in the mentioned file into the created table.
|
org.json.JSONObject |
importData(long viewId,
java.lang.String importType,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String filePath,
org.json.JSONObject config)
Import the data contained in the mentioned file into the table.
|
long |
importDataAsBatches(long viewId,
java.lang.String importType,
boolean autoIdentify,
java.lang.String filePath,
int batchSize,
org.json.JSONObject config,
org.json.JSONObject toolConfig)
Asynchronously import the data contained in the mentioned file into the table.
|
org.json.JSONObject |
importDataInNewTable(java.lang.String tableName,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String filePath,
org.json.JSONObject config)
Create a new table and import the data contained in the mentioned file into the created table.
|
long |
importDataInNewTableAsBatches(java.lang.String tableName,
boolean autoIdentify,
java.lang.String filePath,
int batchSize,
org.json.JSONObject config,
org.json.JSONObject toolConfig)
Create a new table and import the data contained in the mentioned file into the created table.
|
org.json.JSONObject |
importRawData(long viewId,
java.lang.String importType,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String data,
org.json.JSONObject config)
Import the raw data provided into the table.
|
org.json.JSONObject |
importRawDataInNewTable(java.lang.String tableName,
java.lang.String fileType,
boolean autoIdentify,
java.lang.String data,
org.json.JSONObject config)
Create a new table and import the raw data provided into the created table.
|
long |
initiateBulkExport(long viewId,
java.lang.String responseFormat,
org.json.JSONObject config)
Initiate asynchronous export for the mentioned table (or) view data.
|
long |
initiateBulkExportUsingSQL(java.lang.String sqlQuery,
java.lang.String responseFormat,
org.json.JSONObject config)
Initiate asynchronous export with the given SQL Query.
|
protected BulkAPI(AnalyticsClient ac, long orgId, long workspaceId)
BulkAPI
instance.ac
- AnalyticsClient
instance.orgId
- The ID of the organization.workspaceId
- The ID of the workspace.public org.json.JSONObject importDataInNewTable(java.lang.String tableName, java.lang.String fileType, boolean autoIdentify, java.lang.String filePath, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
tableName
- Name of the new table to be created.fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.config
- Contains any additional control configurations. Can be null.JSONObject
of import result.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public org.json.JSONObject importData(long viewId, java.lang.String importType, java.lang.String fileType, boolean autoIdentify, java.lang.String filePath, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view where the data to be imported.importType
- The type of import. Can be one of fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.config
- Contains any additional control configurations. Can be null.JSONObject
of import result.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public org.json.JSONObject importRawDataInNewTable(java.lang.String tableName, java.lang.String fileType, boolean autoIdentify, java.lang.String data, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
tableName
- Name of the new table to be created.fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.data
- Raw data to be imported.config
- Contains any additional control configurations. Can be null.JSONObject
of import result.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public org.json.JSONObject importRawData(long viewId, java.lang.String importType, java.lang.String fileType, boolean autoIdentify, java.lang.String data, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view where the data to be imported.importType
- The type of import. Can be one of fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.data
- Raw data to be imported.config
- Contains any additional control configurations. Can be null.JSONObject
of import result.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public long importBulkDataInNewTable(java.lang.String tableName, java.lang.String fileType, boolean autoIdentify, java.lang.String filePath, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
tableName
- Name of the new table to be created.fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.config
- Contains any additional control configurations. Can be null.long
of the job id created.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public long importBulkData(long viewId, java.lang.String importType, java.lang.String fileType, boolean autoIdentify, java.lang.String filePath, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view where the data to be imported.importType
- The type of import. Can be one of fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.config
- Contains any additional control configurations. Can be null.long
of job id created.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public org.json.JSONObject getImportJobDetails(long jobId) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
jobId
- Id of the import job.JSONObject
of import result.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public void exportData(long viewId, java.lang.String responseFormat, java.lang.String filePath, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view to be exported.responseFormat
- The format in which the data is to be exported.filePath
- Path of the file where the data exported to be stored.config
- Contains any additional control configurations. Can be null.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public void exportData(long viewId, java.lang.String responseFormat, java.io.OutputStream stream, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view to be exported.responseFormat
- The format in which the data is to be exported.stream
- Outputstream where the data exported to be stored.config
- Contains any additional control configurations. Can be null.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public long initiateBulkExport(long viewId, java.lang.String responseFormat, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewId
- Id of the view to be exported.responseFormat
- The format in which the data is to be exported.config
- Contains any additional control configurations. Can be null.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public long initiateBulkExportUsingSQL(java.lang.String sqlQuery, java.lang.String responseFormat, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
sqlQuery
- The SQL Query whose output is exported.responseFormat
- The format in which the data is to be exported.config
- Contains any additional control configurations. Can be null.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public org.json.JSONObject getExportJobDetails(long jobId) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
jobId
- Id of the export job.JSONObject
of export job details.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public void exportBulkData(long jobId, java.lang.String filePath) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
jobId
- Id of the job to be exported.filePath
- Path of the file where the data exported to be stored.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public void exportBulkData(long jobId, java.io.OutputStream stream) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
jobId
- Id of the job to be exported.stream
- Outputstream where the data exported to be stored.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.public long importDataInNewTableAsBatches(java.lang.String tableName, boolean autoIdentify, java.lang.String filePath, int batchSize, org.json.JSONObject config, org.json.JSONObject toolConfig) throws ServerException, ParseException, java.io.IOException, org.json.JSONException, java.lang.Exception
tableName
- Name of the new table to be created.fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.batchSize
- Number of lines per batch.config
- Contains any additional control configurations. Can be null.toolConfig
- Contains any additional control configurations for the parser tool. Can be null.long
of the job id created.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.java.lang.Exception
public long importDataAsBatches(long viewId, java.lang.String importType, boolean autoIdentify, java.lang.String filePath, int batchSize, org.json.JSONObject config, org.json.JSONObject toolConfig) throws ServerException, ParseException, java.io.IOException, org.json.JSONException, java.lang.Exception
viewId
- Id of the view where the data to be imported.importType
- The type of import. Can be one of fileType
- Type of the file to be imported.autoIdentify
- Used to specify whether to auto identify the CSV format.filePath
- Path of the file to be imported.batchSize
- Number of lines per batch.config
- Contains any additional control configurations. Can be null.toolConfig
- Contains any additional control configurations for the parser tool. Can be null.long
of job id created.ServerException
- If the server has received the request but did not process the request, due to some error.ParseException
- If the server has responded but the client was not able to parse the response.java.io.IOException
- If any communication related errors like request time out occurs, when trying to contact the service.org.json.JSONException
- If any errors while processing the JSON data.java.lang.Exception
Copyright © 2023 AdventNet Inc. All Rights Reserved.