36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
"""
Load CSV into PostgreSQL table, handling INTEGER and REAL columns appropriately.
"""
# Define which columns are INTEGER based on your schema
integer_columns_by_table = {
"Spatial": [0, 8], # ID, DOUBT
"Linguistic": [0, 1, 2, 3, 6, 8, 10], # ID, SPATID, DOUSPAT, MAINID, DOUTOPO, DOULANG, DOUPRON
"Temporal": [0, 1, 3, 4, 5, 6, 8], # ID, LINGID, START, DOUSTART, END, DOUEND, OBJID
"Sources": [4] # YEAR
}
# Define which columns are REAL based on your schema
real_columns_by_table = {
"Spatial": [1, 2], # LAT, LON
"Linguistic": [], # No REAL columns
|
|
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
"""
Load CSV into PostgreSQL table, handling INTEGER and REAL columns appropriately.
"""
# Define which columns are INTEGER based on your schema
integer_columns_by_table = {
"Spatial": [0, 8], # ID, DOUBT
"Linguistic": [0, 1, 2, 3, 6, 8, 10], # ID, SPATID, DOUSPAT, MAINID, DOUTOPO, DOULANG, DOUPRON
"Temporal": [0, 1, 3, 4, 5, 6, 8], # ID, LINGID, STARTYEAR, DOUSTART, ENDYEAR, DOUEND, OBJID
"Sources": [4] # YEAR
}
# Define which columns are REAL based on your schema
real_columns_by_table = {
"Spatial": [1, 2], # LAT, LON
"Linguistic": [], # No REAL columns
|