提交 afc4c78b 编写于 作者: S serge-rider

#6543 Data transfer: attribute bindings processing redesigned


Former-commit-id: 5e45a892
上级 56350e60
......@@ -172,6 +172,8 @@ public class DatabaseTransferProducer implements IDataTransferProducer<DatabaseP
monitor.beginTask(DTMessages.data_transfer_wizard_job_task_export_table_data, (int) totalRows);
try {
monitor.subTask("Read data");
// Perform export
if (settings.getExtractType() == DatabaseProducerSettings.ExtractType.SINGLE_QUERY) {
// Just do it in single query
......
......@@ -634,7 +634,7 @@ public final class DBUtils {
/**
* Returns "bottom" level attributes out of resultset.
* For regualar resultsets it is the same as getAttributeBindings, for compelx types it returns only leaf attributes.
* For regular resultsets it is the same as getAttributeBindings, for compelx types it returns only leaf attributes.
*/
@NotNull
public static List<DBDAttributeBinding> makeLeafAttributeBindings(@NotNull DBCSession session, @NotNull DBSDataContainer dataContainer, @NotNull DBCResultSet resultSet) throws DBCException {
......@@ -646,11 +646,13 @@ public final class DBUtils {
try {
List<Object[]> sampleRows = Collections.emptyList();
if (resultSet instanceof DBCResultSetSampleProvider) {
session.getProgressMonitor().subTask("Read sample rows");
sampleRows = ((DBCResultSetSampleProvider) resultSet).getSampleRows(session, MAX_SAMPLE_ROWS);
}
session.getProgressMonitor().subTask("Discover attribute structure");
docBinding.lateBinding(session, sampleRows);
} catch (DBException e) {
log.debug("Document attribute '" + docBinding.getName() + "' binding error", e);
} catch (Exception e) {
log.error("Document attribute '" + docBinding.getName() + "' binding error", e);
}
List<DBDAttributeBinding> nested = docBinding.getNestedBindings();
if (!CommonUtils.isEmpty(nested)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册