Specify output directory in `dx run table-exporter` Answered
Hi,
When running table-exporter from the command line is it possible to specify the output directory? The default is to put the new file in the root directory of the project.
I tried doing -ioutput="files/filename" but table-exporter ends up throwing an error (this from the log):
Log excerpt (last 10 lines)
+ [[ 0 -eq 0 ]]
+ hdfs dfs -copyToLocal hdfs:///tmp/csv /tmp
+ mkdir -p /home/dnanexus/out/csv
++ echo TSV
++ awk '{print tolower($0)}'
+ file_format=tsv
+ for folder in /tmp/csv/output/*
+ ls '/tmp/csv/output/files/part*.csv'
+ ls -ail ''
ls: cannot access '': No such file or directoryI couldn't see any other output-related options in the documentation (https://documentation.dnanexus.com/developer/apps/developing-spark-apps/table-exporter-application) yet when executing the Tabel Exporter via the app, there is an option to change the output directory.
Thanks,
Luke
Comments
2 comments
Hi Luke,
Yes, whenever you run any app using dx run you can set the directory for the outputs using the --destination flag. For more info please see Index of dx commands.
Here is an example command:
dx run table-exporter -idataset_or_cohort_or_dashboard=<dataset_id> -ifield_names=p31 -ientity=participant --destination test/Hope this helps!
Fantastic, thank you. Can't believe I missed that.
All the best,
Luke
Please sign in to leave a comment.