reads_json does not work
See original GitHub issueWhenever I try to use read_json it does not work. For instance, when I make a simple wdl like:
workflow quantification {
File references
Map[String, String] indexes = read_json(references)
}
where test.json is:
```json
{
"quantification.references": "/home/antonkulaga/rna-seq/workflows/rna-seq/quantification/inputs/test.json"
}
it tells
Unable to build WOM node for Declaration ‘indexes’: Return type of read_json() can’t be known statically at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor.cromwell$engine$workflow$lifecycle$materialization$MaterializeWorkflowDescriptorActor$$workflowInitializationFailed(MaterializeWorkflowDescriptorActor.scala:211) at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor$$anonfun$2.applyOrElse(MaterializeWorkflowDescriptorActor.scala:181) at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor$$anonfun$2.applyOrElse(MaterializeWorkflowDescriptorActor.scala:176) at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
That means I cannot just load a file and parse it, so how else can I read JSON then?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Looks like read_json in current trunk still has some issues. When I give a json like this:
with wdl like this
I get:
I do not get what is wrong there, I’ve tried different type combinations.
Hi @antonkulaga - sorry to come to this so late. It does look like the coercion function might require a little bit of a fixup here. In the mean time did you try using the
Object
type?