mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 07:40:30 +08:00
Merge pull request #343 from bakea/master
fix#342 support phoenix table name lower case.
This commit is contained in:
commit
7b0216f70a
@ -48,6 +48,7 @@ DataX目前已经有了比较全面的插件体系,主流的RDBMS数据库、N
|
||||
| | Hbase0.94 | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/hbase094xreader/doc/hbase094xreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/hbase094xwriter/doc/hbase094xwriter.md)|
|
||||
| | Hbase1.1 | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/hbase11xreader/doc/hbase11xreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/hbase11xwriter/doc/hbase11xwriter.md)|
|
||||
| | Phoenix4.x | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/hbase11xsqlreader/doc/hbase11xsqlreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/hbase11xsqlwriter/doc/hbase11xsqlwriter.md)|
|
||||
| | Phoenix5.x | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/hbase20xsqlreader/doc/hbase20xsqlreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/hbase20xsqlwriter/doc/hbase20xsqlwriter.md)|
|
||||
| | MongoDB | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/mongoreader/doc/mongoreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/mongowriter/doc/mongowriter.md)|
|
||||
| | Hive | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/hdfsreader/doc/hdfsreader.md) 、[写](https://github.com/alibaba/DataX/blob/master/hdfswriter/doc/hdfswriter.md)|
|
||||
| 无结构化数据存储 | TxtFile | √ | √ |[读](https://github.com/alibaba/DataX/blob/master/txtfilereader/doc/txtfilereader.md) 、[写](https://github.com/alibaba/DataX/blob/master/txtfilewriter/doc/txtfilewriter.md)|
|
||||
|
@ -49,9 +49,9 @@ public class HBase20SQLReaderHelper {
|
||||
String schema = configuration.getString(Key.SCHEMA, null);
|
||||
String tableName = configuration.getNecessaryValue(Key.TABLE, HBase20xSQLReaderErrorCode.REQUIRED_VALUE);
|
||||
if (schema != null && !schema.isEmpty()) {
|
||||
fullTableName = schema + "." + tableName;
|
||||
fullTableName = "\"" + schema + "\".\"" + tableName + "\"";
|
||||
} else {
|
||||
fullTableName = tableName;
|
||||
fullTableName = "\"" + tableName + "\"";
|
||||
}
|
||||
// 如果列名未配置,默认读取全部列*
|
||||
columnNames = configuration.getList(Key.COLUMN, String.class);
|
||||
@ -248,7 +248,7 @@ public class HBase20SQLReaderHelper {
|
||||
String querySql;
|
||||
StringBuilder columnBuilder = new StringBuilder();
|
||||
for (String columnName : columnNames) {
|
||||
columnBuilder.append(columnName).append(",");
|
||||
columnBuilder.append("\"").append(columnName).append("\",");
|
||||
}
|
||||
columnBuilder.setLength(columnBuilder.length() -1);
|
||||
if (StringUtils.isBlank(where)) {
|
||||
|
@ -72,9 +72,9 @@ public class HBase20xSQLWriterTask {
|
||||
batchSize = configuration.getInt(Key.BATCHSIZE, Constant.DEFAULT_BATCH_ROW_COUNT);
|
||||
String schema = configuration.getString(Key.SCHEMA);
|
||||
String tableName = configuration.getNecessaryValue(Key.TABLE, HBase20xSQLWriterErrorCode.REQUIRED_VALUE);
|
||||
fullTableName = tableName;
|
||||
fullTableName = "\"" + tableName + "\"";
|
||||
if (schema != null && !schema.isEmpty()) {
|
||||
fullTableName = schema + "." + tableName;
|
||||
fullTableName = "\"" + schema + "\".\"" + tableName + "\"";
|
||||
}
|
||||
columns = configuration.getList(Key.COLUMN, String.class);
|
||||
if (pstmt == null) {
|
||||
@ -125,7 +125,7 @@ public class HBase20xSQLWriterTask {
|
||||
int[] types = new int[numberOfColumnsToWrite];
|
||||
StringBuilder columnNamesBuilder = new StringBuilder();
|
||||
for (String columnName : columns) {
|
||||
columnNamesBuilder.append(columnName).append(",");
|
||||
columnNamesBuilder.append("\"").append(columnName).append("\",");
|
||||
}
|
||||
columnNamesBuilder.setLength(columnNamesBuilder.length() - 1);
|
||||
// 查询一条数据获取表meta信息
|
||||
|
Loading…
Reference in New Issue
Block a user