Skip to content

Commit

Permalink
[ 1963349 ] Use target schema when loading data
Browse files Browse the repository at this point in the history
This is a bit of a temporary hack that gets things working for users -- we use the schema of the first table we find.  It really needs to use the target schema as specified by the user.
  • Loading branch information
erilong committed May 14, 2008
1 parent 6cdaca8 commit fa664f3
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -164,7 +164,16 @@ private StatementBuilder getStatementBuilder(IDataLoaderContext ctx, DmlType typ
columnKeyMetaData = (Column[]) ArrayUtils.addAll(columnMetaData, keyMetaData);
}

st = new StatementBuilder(type, table.getName(), keyMetaData,
String tableName = table.getName();
if (table.getSchema() != null && dbDialect.getDefaultSchema() != null
&& !table.getSchema().equals(dbDialect.getDefaultSchema())) {
tableName = table.getSchema() + "." + tableName;
}
if (table.getCatalog() != null && dbDialect.getDefaultCatalog() != null
&& !table.getCatalog().equals(dbDialect.getDefaultCatalog())) {
tableName = table.getCatalog() + "." + tableName;
}
st = new StatementBuilder(type, tableName, keyMetaData,
getColumnMetaData(filteredColumnNames), dbDialect.isBlobOverrideToBinary());
statementMap.put(type, st);
}
Expand Down

0 comments on commit fa664f3

Please sign in to comment.