CarbonInputFormat.setTableInfo(job.getConfiguration(), table.getTableInfo()); CarbonInputFormat.setTablePath(job.getConfiguration(), table.getTablePath()); CarbonInputFormat.setTableName(job.getConfiguration(), table.getTableName());
public static <V> CarbonTableInputFormat<V> createCarbonTableInputFormat( Job job, CarbonTable carbonTable, String[] projectionColumns, Expression filterExpression, List<PartitionSpec> partitionNames, DataMapJob dataMapJob) throws IOException, InvalidConfigurationException { Configuration conf = job.getConfiguration(); CarbonInputFormat.setTableInfo(conf, carbonTable.getTableInfo()); CarbonInputFormat.setDatabaseName(conf, carbonTable.getTableInfo().getDatabaseName()); CarbonInputFormat.setTableName(conf, carbonTable.getTableInfo().getFactTable().getTableName()); if (partitionNames != null) { CarbonInputFormat.setPartitionsToPrune(conf, partitionNames); } CarbonInputFormat .setTransactionalTable(conf, carbonTable.getTableInfo().isTransactionalTable()); CarbonProjection columnProjection = new CarbonProjection(projectionColumns); return createInputFormat(conf, carbonTable.getAbsoluteTableIdentifier(), filterExpression, columnProjection, dataMapJob); }