Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
simmctic
tools
Commits
18225ade
Commit
18225ade
authored
Aug 27, 2019
by
Lucas Fernandes de Oliveira
Browse files
Parse queries to csv
Signed-off-by:
Lucas Fernandes de Oliveira
<
lfoliveira@inf.ufpr.br
>
parent
c626f73c
Changes
9
Hide whitespace changes
Inline
Side-by-side
queries/contact_convention_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
co
.
cod_gesac
,
ct
.
name
AS
"responsible_name"
...
...
@@ -23,4 +24,4 @@ FROM
WHERE
co
.
cod_gesac
IS
NOT
NULL
AND
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/contact_entity_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
c
.
city_code
,
e
.
access_point_id
...
...
@@ -25,4 +26,4 @@ FROM
INNER
JOIN
contact
ct
ON
p
.
id
=
ct
.
id_point
WHERE
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/contact_telecenter_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
t
.
id_onid
,
ct
.
name
AS
"responsible_name"
...
...
@@ -23,4 +24,4 @@ FROM
WHERE
t
.
id_onid
IS
NOT
NULL
AND
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/convention_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
c
.
name
AS
"city"
,
c
.
state
AS
"state"
...
...
@@ -49,4 +50,4 @@ FROM
WHERE
co
.
cod_gesac
IS
NOT
NULL
AND
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/entity2_temp.sql
View file @
18225ade
...
...
@@ -3,6 +3,7 @@
-- for details check simmctic/database/create/data/004-load_data_entity2.sql
-- and simmctic/database/create/data/entity2_temp.csv
COPY
(
SELECT
c
.
name
AS
"city"
,
c
.
state
AS
"state"
...
...
@@ -43,4 +44,4 @@ FROM
LEFT
OUTER
JOIN
address_alternative
aa
ON
p
.
id
=
aa
.
id_point
WHERE
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/entity_net_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
c
.
city_code
,
e
.
access_point_id
...
...
@@ -22,4 +23,4 @@ FROM
INNER
JOIN
entity_net
en
ON
p
.
id
=
en
.
id_point
WHERE
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/entity_temp.sql
View file @
18225ade
...
...
@@ -3,6 +3,7 @@
-- for details check simmctic/database/create/data/003-load_data_entity.sql
-- and simmctic/database/create/data/entity_temp.csv
COPY
(
SELECT
c
.
name
AS
"city"
,
c
.
state
AS
"state"
...
...
@@ -35,4 +36,4 @@ FROM
LEFT
OUTER
JOIN
address_alternative
aa
ON
p
.
id
=
aa
.
id_point
WHERE
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/scholarship_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
t
.
id_onid
,
s
.
value
...
...
@@ -19,4 +20,4 @@ FROM
WHERE
t
.
id_onid
IS
NOT
NULL
AND
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
queries/telecenter_temp.sql
View file @
18225ade
...
...
@@ -7,6 +7,7 @@
-- query.
COPY
(
SELECT
c
.
name
AS
"city"
,
c
.
state
AS
"state"
...
...
@@ -54,4 +55,4 @@ FROM
WHERE
t
.
id_onid
IS
NOT
NULL
AND
p
.
is_active
;
)
TO
STDOUT
WITH
CSV
HEADER
DELIMITER
';'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment