This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `security_info` ( | |
`key_id` VARCHAR(25) NOT NULL, | |
`ticker` VARCHAR(8) NOT NULL, | |
`figi` VARCHAR(14) NOT NULL, | |
`company_name` VARCHAR(100) NOT NULL, | |
`company_id` VARCHAR(12) NOT NULL, | |
`security_id` VARCHAR(12) NULL, | |
`composite_ticker` VARCHAR(14) NULL, | |
`share_class_figi` VARCHAR(14) NULL, | |
`composite_figi` VARCHAR(14) NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE price_data_historical_bkup AS SELECT * FROM price_data_historical; | |
INSERT INTO price_data_historical_bkup AS SELECT * FROM price_data_historical; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE INDEX idx_ticker ON price_data_historical (ticker(8)); | |
CREATE INDEX idx_figi ON price_data_historical (figi(14)); | |
CREATE INDEX idx_date ON price_data_historical (date); | |
CREATE INDEX idx_update_date ON price_data_historical (last_update_date); | |
CREATE INDEX idx_corp_action_date ON price_data_historical (last_corp_action_date); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD DATA LOCAL INFILE '/Users/....../data_files/df_full_price_history_complete_load.csv' | |
INTO TABLE price_data_historical | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
IGNORE 1 LINES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `price_data_historical` ( | |
`key_id` varchar(30) NOT NULL PRIMARY KEY, | |
`ticker` varchar(8) NOT NULL, | |
`figi` varchar(14) NOT NULL, | |
`date` datetime NOT NULL, | |
`open` float NULL, | |
`high` float NULL, | |
`low` float NULL, | |
`close` float NULL, | |
`volume` float NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import credentials | |
import json | |
f = open("/Users/......./credentials.json") | |
credentials = json.load(f) | |
file_path = list(credentials.values())[0] | |
intrinio_key = list(credentials.values())[1] | |
aws_key = list(credentials.values())[2] | |
aws_secret_key = list(credentials.values())[3] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder