Skip to content

Commit

Permalink
Resolve resourceKey for export jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Ansari, Mujammil <[email protected]>
  • Loading branch information
mujammil10 authored and mchrza committed Nov 12, 2024
1 parent fa04873 commit 1321a45
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import com.here.xyz.jobs.RuntimeInfo.State;
import com.here.xyz.jobs.config.JobConfigClient;
import com.here.xyz.jobs.datasets.DatasetDescription;
import com.here.xyz.jobs.datasets.Files;
import com.here.xyz.jobs.datasets.streams.DynamicStream;
import com.here.xyz.jobs.steps.JobCompiler;
import com.here.xyz.jobs.steps.Step;
Expand Down Expand Up @@ -520,10 +521,9 @@ public Job withId(String id) {

@JsonView(Static.class)
public String getResourceKey() {
//TODO: Identify when to use the key from source vs from target
if (getTarget() == null)
return null;
return getTarget().getKey();
//Always use key from the source except when the source is Files
if(getSource() == null) return null;
return getSource() instanceof Files<?> ? getTarget().getKey() : getSource().getKey();
}

public String getDescription() {
Expand Down

0 comments on commit 1321a45

Please sign in to comment.