54 cnx.create_entity('TimeZone', code=code, gmt=float(gmt), |
54 cnx.create_entity('TimeZone', code=code, gmt=float(gmt), |
55 dst=float(dst), raw_offset=float(raw_offset)) |
55 dst=float(dst), raw_offset=float(raw_offset)) |
56 timezone_code = dict(cnx.execute('Any C, X WHERE X is TimeZone, X code C')) |
56 timezone_code = dict(cnx.execute('Any C, X WHERE X is TimeZone, X code C')) |
57 # Push data |
57 # Push data |
58 for ind, infos in enumerate(ucsvreader(open(dumpname, 'rb'), |
58 for ind, infos in enumerate(ucsvreader(open(dumpname, 'rb'), |
59 separator='\t', |
59 delimiter='\t', |
60 ignore_errors=True)): |
60 ignore_errors=True)): |
61 latitude = self.cast(float, infos[4]) |
61 latitude = self.cast(float, infos[4]) |
62 longitude = self.cast(float, infos[5]) |
62 longitude = self.cast(float, infos[5]) |
63 population = self.cast(int, infos[14]) |
63 population = self.cast(int, infos[14]) |
64 elevation = self.cast(int, infos[15]) |
64 elevation = self.cast(int, infos[15]) |