Skip to content

[CLI] Support output file patterns with variables placed in directory names #555

@enridaga

Description

@enridaga

For example, the following does not currently work:

 fx -q fx/generate-turtles.sparql -v database/listening-experiences.csv -p "database/?id/graph.ttl"

where id is one of the CSV column names passed in -v.

Enabling debug log we can see the details:

java.io.FileNotFoundException: database/1431361600838/graph.ttl (No such file or directory)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:155)
	at io.github.sparqlanything.cli.SPARQLAnything.getPrintStream(SPARQLAnything.java:194)
	at io.github.sparqlanything.cli.SPARQLAnything.executeQueryWithValues(SPARQLAnything.java:580)
	at io.github.sparqlanything.cli.SPARQLAnything.main(SPARQLAnything.java:527)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions