Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion gortools/src/main/scala/gorsat/Commands/Write.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ import org.gorpipe.gor.driver.meta.{DataType, SourceReference}
import org.gorpipe.gor.driver.providers.stream.sources.StreamSource
import org.gorpipe.gor.session.GorContext
import org.gorpipe.gor.util.DataUtil
import org.slf4j.{Logger, LoggerFactory}

object Write {
val log: Logger = LoggerFactory.getLogger(this.getClass)
}

class Write extends CommandInfo("WRITE",
CommandArguments("-r -c -m -inferschema -maxseg -noheader", "-d -f -i -t -l -tags -card -prefix -link -linkmeta", 0),
Expand All @@ -47,7 +51,9 @@ class Write extends CommandInfo("WRITE",

fileName = if (fileName.isEmpty && linkOpt.nonEmpty) {
val linkMetaInfo = LinkFileUtil.extractLinkMetaInfo(linkMetaOpt)
val linkSourceRef = new SourceReference(linkOpt, null, context.getSession.getProjectContext.getFileReader.getCommonRoot, null, null, true);
val linkSourceRef = new SourceReference(linkOpt,
context.getSession.getProjectContext.getFileReader.getSecurityContext,
context.getSession.getProjectContext.getFileReader.getCommonRoot, null, null, true);
// Infer the full file name from the link (and defautl locations)
LinkFileUtil.inferDataFileNameFromLinkFile(
context.getSession.getProjectContext.getFileReader.resolveDataSource(linkSourceRef).asInstanceOf[StreamSource], linkMetaInfo.linkFileMeta);
Expand Down
Loading