annotate sqlite_to_tabular.xml @ 23:5bb148ee644a draft default tip

Deleted selected files
author jjohnson
date Mon, 17 Jul 2017 15:22:38 -0400
parents bed5018e7ae3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
1 <?xml version="1.0"?>
22
bed5018e7ae3 Uploaded
jjohnson
parents: 21
diff changeset
2 <tool id="sqlite_to_tabular" name="SQLite to tabular" version="5.0.0">
20
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
3 <description>for SQL query</description>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
4
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
5 <macros>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
6 <import>macros.xml</import>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
7 </macros>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
8
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
9 <command detect_errors="exit_code"><![CDATA[
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
10 python '$__tool_directory__/sqlite_to_tabular.py'
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
11 --sqlitedb='$sqlitedb'
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
12 --query_file='$query_file'
20
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
13 $no_header
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
14 --output='$query_results'
20
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
15 ]]></command>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
16 <configfiles>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
17 <configfile name="query_file">
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
18 $sqlquery
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
19 </configfile>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
20 </configfiles>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
21 <inputs>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
22 <param name="sqlitedb" type="data" format="sqlite" label="SQLite Database"/>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
23 <param name="sqlquery" type="text" area="True" size="120x20" label="SQL query">
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
24 <validator type="regex">(?ims)^\s*SELECT\s.*\sFROM\s.*$</validator>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
25 <sanitizer sanitize="False"/>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
26 </param>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
27 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
28 </inputs>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
29 <outputs>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
30 <data name="query_results" format="tabular" />
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
31 </outputs>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
32 <tests>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
33 <test>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
34 <param name="sqlitedb" ftype="sqlite" value="testdb.sqlite" />
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
35 <param name="sqlquery" value="SELECT first_name, last_name, age FROM contacts WHERE first_name = 'Sam'" />
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
36 <output name="query_results">
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
37 <assert_contents>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
38 <has_text text="Smith" />
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
39 <not_has_text text="Doe" />
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
40 </assert_contents>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
41 </output>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
42 </test>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
43 </tests>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
44 <help><![CDATA[
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
45 =================
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
46 SQLite to Tabular
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
47 =================
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
48
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
49 **Inputs**
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
50
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
51 An existing SQLite_ data base.
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
52
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
53
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
54 **Outputs**
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
55
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
56 The results of a SQL query are output to the history as a tabular file.
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
57
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
58
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
59
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
60 @QUERY_HELP@
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
61
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
62 ]]></help>
ab27c4bd14b9 Uploaded
jjohnson
parents:
diff changeset
63 </tool>