Search in sources :

Example 1 with SaveRequest

use of com.thinkbiganalytics.spark.rest.model.SaveRequest in project kylo by Teradata.

the class SparkShellIT method saveScript.

/**
 * Saves the result of a script.
 *
 * @param transformId the transform identifier
 * @param format      the output format
 * @param jdbc        the target JDBC data source
 * @param tableName   the target table name
 * @return the save response
 */
private SaveResponse saveScript(@Nonnull final String transformId, @Nullable final String format, @Nullable final JdbcDatasource jdbc, @Nullable final String tableName) {
    // Create request body
    final SaveRequest request = new SaveRequest();
    request.setFormat(format);
    request.setJdbc(jdbc);
    request.setTableName(tableName);
    // Execute request
    return save(transformId, SparkShellProxyController.TRANSFORM_SAVE, SparkShellProxyController.TRANSFORM_SAVE_RESULT, request);
}
Also used : SaveRequest(com.thinkbiganalytics.spark.rest.model.SaveRequest)

Aggregations

SaveRequest (com.thinkbiganalytics.spark.rest.model.SaveRequest)1