mccgr / edgar

Code to manage data related to SEC EDGAR
31 stars 15 forks source link

Add columns to filing_docs #96

Closed iangow closed 4 years ago

iangow commented 4 years ago
library(dplyr, warn.conflicts = FALSE)
library(DBI)

Sys.setenv(PGHOST="192.168.1.192", PGPORT=5434L)
pg <- dbConnect(RPostgres::Postgres())

rs <- dbExecute(pg, "SET search_path TO edgar_test, edgar")

filing_docs_test <- tbl(pg, "filing_docs_test")
filing_docs <- tbl(pg, "filing_docs")

setdiff(colnames(filing_docs_test), 
        colnames(filing_docs))
#> [1] "document_note" "url"

Created on 2020-06-27 by the reprex package (v0.3.0)

iangow commented 4 years ago

On my local server:

igowmbp15:Spark-The-Definitive-Guide igow$ psql -h iangow.me -p 5434
psql (12.3)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

crsp=# ALTER TABLE edgar.filing_docs ADD COLUMN url text;
ALTER TABLE
crsp=# ALTER TABLE edgar.filing_docs ADD COLUMN document_note text;
ALTER TABLE
crsp=#