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
Simon Bazin
nf26-metar
Commits
6a73b57f
Commit
6a73b57f
authored
Jun 20, 2019
by
sim-baz
Browse files
Modification names tables
parent
3af41a3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
loading.py
View file @
6a73b57f
...
...
@@ -3,8 +3,8 @@ import csv
import
re
FILE_NAME
=
"asos.txt"
table_name_space
=
"
data
"
table_name_date
=
"
data_by_
date"
table_name_space
=
"
station
"
table_name_date
=
"date"
# Country: Finland
# Dates : 2001 to 2010
...
...
@@ -373,15 +373,15 @@ dict = loadata(FILE_NAME)
# print(f"Datas inserted into {table_name_space}")
# # --------------------------------------------------------
# --------------------------------------------------------
# A faire seulement 1 fois pour charger les données
session
.
execute
(
dropTableQuery
(
table_name_date
))
print
(
f
"Table
{
table_name_date
}
dropped"
)
session
.
execute
(
createTableQueryPartitionningByDate
(
table_name_date
))
print
(
f
"Table
{
table_name_date
}
created"
)
print
(
f
"Starting inserting datas into table
{
table_name_date
}
"
)
for
d
in
dict
:
session
.
execute
(
insertQueryData
(
d
,
table_name_date
))
print
(
f
"Datas inserted into
{
table_name_date
}
"
)
# --------------------------------------------------------
\ No newline at end of file
# # --------------------------------------------------------
# # A faire seulement 1 fois pour charger les données
# session.execute(dropTableQuery(table_name_date))
# print(f"Table {table_name_date} dropped")
# session.execute(createTableQueryPartitionningByDate(table_name_date))
# print(f"Table {table_name_date} created")
# print(f"Starting inserting datas into table {table_name_date}")
# for d in dict:
# session.execute(insertQueryData(d, table_name_date))
# print(f"Datas inserted into {table_name_date}")
# # --------------------------------------------------------
\ No newline at end of file
Write
Preview
Supports
Markdown
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