How to generate each query in a separate SQL file using TPC-DS dsqgen tool?
0
votes
1
answer
494
views
I'm using TPC-DS dsqgen to translate its templates to runnable queries.
I tried the following argument variations to save each query in a dedicated
.sql
file, but they all save the runnable query in query_0.sql
, even if I'm using a template other than query1.tpl
!
$ ./dsqgen -v -out ../output/queries -dir ../query_templates -dialect netezza -input ../query_templates/templates.lst
qgen2 Query Generator (Version 3.2.0)
Copyright Transaction Processing Performance Council (TPC) 2001 - 2021
Warning: This scale factor is valid for QUALIFICATION ONLY
Parsed 99 templates
$ ls -ltrh ../output/queries
total 156K
-rw-rw-r-- 1 mgelbana mgelbana 156K Feb 9 20:42 query_0.sql
$ ./dsqgen -v -out ../output/queries -dir ../query_templates -dialect netezza -template ../query_templates/query2.tpl
qgen2 Query Generator (Version 3.2.0)
Copyright Transaction Processing Performance Council (TPC) 2001 - 2021
Parsed 1 templates
$ ls -ltrh ../output/queries
total 4.0K
-rw-rw-r-- 1 mgelbana mgelbana 2.1K Feb 9 20:44 query_0.sql
So regardless if I pick a particular template or just choose to process all templates, I'll still get the output written in a single file by the exact same name every time!
So how can I direct this tool to output the generated runnable SQL query in a dedicated .sql
file names after the associated template?
Asked by Muhammad Gelbana
(135 rep)
Feb 9, 2023, 06:52 PM
Last activity: Feb 9, 2023, 08:51 PM
Last activity: Feb 9, 2023, 08:51 PM