Package com.asakusafw.vocabulary.bulkloader

Examples of com.asakusafw.vocabulary.bulkloader.BulkLoadExporterDescription


    private boolean checkExports(List<OutputDescription> outputs) {
        assert outputs != null;
        boolean valid = true;
        for (OutputDescription output : outputs) {
            BulkLoadExporterDescription desc = extract(output);
            Set<String> columns = Sets.from(desc.getColumnNames());
            if (columns.containsAll(desc.getTargetColumnNames()) == false) {
                getEnvironment().error(
                        "\"{0}\"の正常テーブルには全体の出力カラムに含まれないカラムが存在します: {1}",
                        desc.getClass().getName(),
                        diff(desc.getTargetColumnNames(), columns));
                valid = false;
            }
            DuplicateRecordCheck dupCheck = desc.getDuplicateRecordCheck();
            if (dupCheck != null) {
                if (columns.containsAll(dupCheck.getColumnNames()) == false) {
                    getEnvironment().error(
                            "\"{0}\"の重複エラーテーブルには全体の出力カラムに含まれないカラムが存在します",
                            desc.getClass().getName(),
                            diff(dupCheck.getColumnNames(), columns));
                    valid = false;
                }
                if (columns.containsAll(dupCheck.getCheckColumnNames()) == false) {
                    getEnvironment().error(
View Full Code Here


            }
        }

        Set<String> exportTargets = Sets.create();
        for (OutputDescription description : outputs) {
            BulkLoadExporterDescription desc = extract(description);
            exportTargets.add(desc.getTargetName());
        }
        if (exportTargets.size() >= 2) {
            getEnvironment().error(
                    "ジョブフロー内で複数のエクスポーターを起動できません: {0}",
                    primaryTargets);
View Full Code Here

        return Collections.singletonList(new ExternalIoStage(getId(), stage, context.getOutputContext()));
    }

    private Slot toSlot(Output output) {
        BulkLoadExporterDescription desc = extract(output.getDescription());
        String name = normalize(output.getDescription().getName());
        return new Slot(
                name,
                output.getDescription().getDataType(),
                desc.getPrimaryKeyNames(),
                output.getSources(),
                TemporaryOutputFormat.class);
    }
View Full Code Here

                getImporterDestination(input));
    }

    private ExportTable convert(OutputDescription output) {
        assert output != null;
        BulkLoadExporterDescription desc = extract(output);
        DuplicateRecordCheck duplicate = desc.getDuplicateRecordCheck();
        if (duplicate == null) {
            return new ExportTable(
                    desc.getModelType(),
                    desc.getTableName(),
                    desc.getColumnNames(),
                    desc.getTargetColumnNames(),
                    null,
                    Collections.singletonList(getOutputLocation(output)));
        } else {
            return new ExportTable(
                    desc.getModelType(),
                    desc.getTableName(),
                    desc.getColumnNames(),
                    desc.getTargetColumnNames(),
                    new DuplicateRecordErrorTable(
                            duplicate.getTableName(),
                            duplicate.getColumnNames(),
                            duplicate.getCheckColumnNames(),
                            duplicate.getErrorCodeColumnName(),
View Full Code Here

            if (isCacheEnabled(input.getDescription())) {
                add(caches, target, input);
            }
        }
        for (Output output : context.getOutputs()) {
            BulkLoadExporterDescription desc = extract(output.getDescription());
            String target = desc.getTargetName();
            assert primary == null || primary.equals(target);
            primary = target;
            add(targets, target, output);
        }
        return new CommandProvider(
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.bulkloader.BulkLoadExporterDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.