Skip to content

Commit

Permalink
use old 'org' tables for now
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhallock committed Jul 1, 2020
1 parent 2708b35 commit d69c1f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions graphql/irs_nonprofit_990/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class IrsNonprofit990Model extends Base {
getScyllaTables () {
return [
{
name: 'irs_nonprofit_990s_by_ein_and_year',
name: 'irs_org_990s_by_ein_and_year',
keyspace: 'irs_990_api',
fields: {
ein: 'text',
Expand Down Expand Up @@ -60,7 +60,7 @@ class IrsNonprofit990Model extends Base {
getElasticSearchIndices () {
return [
{
name: 'irs_nonprofit_990s',
name: 'irs_org_990s',
mappings: {
ein: { type: 'keyword' },
year: { type: 'integer' },
Expand Down Expand Up @@ -100,7 +100,7 @@ class IrsNonprofit990Model extends Base {

getAllByEin (ein) {
return cknex().select('*')
.from('irs_nonprofit_990s_by_ein_and_year')
.from('irs_org_990s_by_ein_and_year')
.where('ein', '=', ein)
// TODO: order with withClusteringOrderBy instead of this
.orderBy('year', 'desc')
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ app.use(bodyParser.urlencoded({ extended: true })) // Kiip uses
app.get('/', (req, res) => res.status(200).send('ok'))

const validTables = [
'irs_nonprofits', 'irs_nonprofit_990s', 'irs_funds', 'irs_fund_990s',
'irs_orgs', 'irs_org_990s', 'irs_funds', 'irs_fund_990s',
'irs_persons', 'irs_contributions'
]
app.get('/tableCount', function (req, res) {
Expand Down
8 changes: 4 additions & 4 deletions services/irs_990_importer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export function processUnprocessedFunds ({ limit, chunkSize, chunkConcurrency, r
})
}
/*
truncate irs_990_api.irs_nonprofits_by_ein
truncate irs_990_api.irs_nonprofits_990_by_ein_and_year
curl -XDELETE http://localhost:9200/irs_nonprofit_990s*
curl -XDELETE http://localhost:9200/irs_nonprofits*
truncate irs_990_api.irs_orgs_by_ein
truncate irs_990_api.irs_orgs_990_by_ein_and_year
curl -XDELETE http://localhost:9200/irs_org_990s*
curl -XDELETE http://localhost:9200/irs_orgs*
curl -XDELETE http://localhost:9200/irs_fund_990s*
curl -XDELETE http://localhost:9200/irs_funds*
to del from prod, do same at: kubectl exec altelasticsearch-0 --namespace=production -it -- /bin/bash
Expand Down

0 comments on commit d69c1f8

Please sign in to comment.