-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sql
34 lines (31 loc) · 1.17 KB
/
init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CREATE DATABASE IF NOT EXISTS `te_so`;
USE `te_so`;
DROP TABLE ActualTotalLoad;
CREATE TABLE IF NOT EXISTS ActualTotalLoad(
Id VARCHAR(20) NOT NULL PRIMARY KEY,
EntityCreatedAt CHAR(34) NOT NULL,
EntityModifiedAt CHAR(34) NOT NULL Default 0,
ActionTaskID BIGINT(20) ,
Statuse Varchar(4),
Yeare int(11) NOT NULL ,
Monthe int(11) NOT NULL,
Daye int(11) NOT NULL,
DateTimee VARCHAR(30) NOT NULL,
AreaName VARCHAR(200),
UpdateTime VARCHAR(30) NOT NULL,
TotalLoadValue DECIMAL(24,2) NOT NULL,
AreaTypeCodeId INT(11),
AreaCodeId INT(11),
ResolutionCodeId INT(11),
MapCodeId INT(11),
RowHash CHAR(255)
);
INSERT INTO ActualTotalLoad
VALUES (55998191,"2019-10-01 13:46:36.7610129 +00:00","2019-10-01 13:46:36.7610129 +00:00",312126,"NULL",2018,1,4,"2018-01-04 05:30:00.0000000","DE-AT-LU","2018-04-01 04:01:28.0000000",67928.13,2,55448,1,7,"B82C7EFD-60F2F573-C96FC45E-D1C6BDCF-90931B6E-F597F424-ED2AB8DC-417B2132-1DCDCEFE-7AA96D2A-994E7E4A-48B611ED-148827AF-B30EF809-95994DB3-033F3720
");
-- Mass insert for linux pc's
LOAD DATA LOCAL INFILE '/home/dimitra/Act.csv'
replace INTO TABLE ActualTotalLoad
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;