Skip to content

Commit

Permalink
feat: reintroduce input & output files
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Nov 14, 2023
1 parent 2d1a9f0 commit 16bb082
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/io/kestra/plugin/dbt/cli/AbstractDbt.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.tasks.NamespaceFiles;
import io.kestra.core.models.tasks.NamespaceFilesInterface;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.models.tasks.*;
import io.kestra.core.runners.RunContext;
import io.kestra.core.tasks.PluginUtilsService;
import io.kestra.plugin.dbt.ResultParser;
Expand Down Expand Up @@ -39,7 +36,7 @@
@EqualsAndHashCode
@Getter
@NoArgsConstructor
public abstract class AbstractDbt extends Task implements RunnableTask<ScriptOutput>, NamespaceFilesInterface {
public abstract class AbstractDbt extends Task implements RunnableTask<ScriptOutput>, NamespaceFilesInterface, InputFilesInterface, OutputFilesInterface {
@Builder.Default
@Schema(
title = "Stop execution at the first failure."
Expand Down Expand Up @@ -147,13 +144,19 @@ public void setDockerOptions(DockerOptions dockerOptions) {

private NamespaceFiles namespaceFiles;

private Object inputFiles;

private List<String> outputFiles;

protected abstract java.util.List<String> dbtCommands(RunContext runContext, Path workingDirectory) throws IllegalVariableEvaluationException;

@Override
public ScriptOutput run(RunContext runContext) throws Exception {
CommandsWrapper commandsWrapper = new CommandsWrapper(runContext)
.withEnv(this.getEnv())
.withNamespaceFiles(namespaceFiles)
.withInputFiles(inputFiles)
.withOutputFiles(outputFiles)
.withRunnerType(this.getRunner())
.withDockerOptions(this.getDocker())
.withLogConsumer(new AbstractLogConsumer() {
Expand Down

0 comments on commit 16bb082

Please sign in to comment.