Writes the triples as N-Quads file(s) to the specified location using the given graph.
Writes the triples as N-Quads file(s) to the specified location using the given graph.
-
A directory is created and multiple files are written underneath. (Default behavior)
This sink creates a directory called "path1", and files "1", "2" ... are writen underneath depending
on parallelism
. └── path1/ ├── 1 ├── 2 └── ...
Code Example
dataset.saveAsNQuadsFile("file:///path1")
- A single file called "path1" is created when parallelism is set to 1
. └── path1
Code Example
// Parallelism is set to only this particular operation dataset.saveAsNQuadsFile("file:///path1").setParallelism(1) // This will have the same effect but note all operators' parallelism are set to one env.setParallelism(1); ... dataset.saveAsNQuadsFile("file:///path1")
- A directory is always created when fs.output.always-create-directory is set to true in flink-conf.yaml file, even when parallelism is set to 1.
.
└── path1/
└── 1
Code Example
// fs.output.always-create-directory = true dataset.saveAsNQuadsFile("file:///path1").setParallelism(1)
The graph used for the N-Quads
The path pointing to the location the text file or files under the directory is written to.
Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.
The DataSink that writes the DataSet.
Writes the triples as N-Triples file(s) to the specified location.
Writes the triples as N-Triples file(s) to the specified location.
-
A directory is created and multiple files are written underneath. (Default behavior)
This sink creates a directory called "path1", and files "1", "2" ... are writen underneath depending
on parallelism
. └── path1/ ├── 1 ├── 2 └── ...
Code Example
dataset.saveAsNTriplesFile("file:///path1")
- A single file called "path1" is created when parallelism is set to 1
. └── path1
Code Example
// Parallelism is set to only this particular operation dataset.saveAsNTriplesFile("file:///path1").setParallelism(1) // This will have the same effect but note all operators' parallelism are set to one env.setParallelism(1); ... dataset.saveAsNTriplesFile("file:///path1")
- A directory is always created when fs.output.always-create-directory is set to true in flink-conf.yaml file, even when parallelism is set to 1.
.
└── path1/
└── 1
Code Example
// fs.output.always-create-directory = true dataset.saveAsNTriplesFile("file:///path1").setParallelism(1)
The path pointing to the location the text file or files under the directory is written to.
Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.
The DataSink that writes the DataSet.
Adds methods,
ntriples
andturtle
, to org.apache.flink.api.scala.ExecutionEnvironment that allows to write N-Triples and N-Quads files.