-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example 1: Disbursements missing from /schedule_b/by_recipient/ #3390
Comments
The logic preventing this from appearing seems to be in I'm guessing at least for example 1, we may be excluding memos. Example 2 is on line 29 - I want to see what other filters are on the aggregate table. |
One possible solution @fecjjeng and I discussed is showing $0 totals for recipients that have only memoed transactions. Example: $100 By recipient aggregate: logic for
|
After giving it more thought, a separate column for SQL:
Output looks like:
|
For the second example, we're using |
The original logic is to only include the non-memo entries (i.e. memo_cd != ‘X’ or memo_cd is null). The proposed business logic updates separated the entries into non-memo and memo items, with two additional columns of memo_total and memo_count. Memo: @lbeaufort @PaulClark2 @jwchumley This change will involve updates in Oracle procedures, in Java script, and in Postgresql database table structure, re-load the data, and API, we would like to be sure before we proceed.
If #1 holds true, If #2 holds true, |
Thanks so much for taking a look, @fecjjeng! I agree with your SQL edit. It also makes sense for me to keep all three Schedule B aggregates consistent. I have bandwidth to write SQL for the other two tables, get testing examples, and make the API and SQL migration changes necessary this sprint. |
|
@lbeaufort Three "new" tables had been created in the DEV database: These tables had been loaded with data for the past three days. It can be used as template for the API work for issue #3390. Once API tasks had been worked out, a complete reload (which will take some time) will be executed to provide full sets of data. These tables had renamed the following two columns: And added two new columns |
We plan to do dual daily updates on both new and current sched_b_agg_xxxxx tables after the initial loading until API in all environments start using the new tables. Then another issue will be used to drop the "old" tables. |
API change is completed but can't be merged until the CMS work is done. Because the variable names returned by endpoint have been changed, the CMS needs to capture this change. Otherwise, the page will broke. http://127.0.0.1:8000/data/committee/C00580100/?tab=spending |
Issue has been merged, so closing. |
Some disbursements are missing from /schedule_b/by_recipient/.
From an API user:
Example 1:
First, considering the vendor DRL Publications
The following request, which is trying to get a list of every committee that spent money on DRL Publications yields no results:
https://api.open.fec.gov/v1/schedules/schedule_b/by_recipient/?api_key=DEMO_KEY&cycle=2016&per_page=20&recipient_name=DRL%20PUBLICATIONS&page=1
However, the same search on /schedule_b/ and the front end returns one result:
https://api.open.fec.gov/v1/schedules/schedule_b/?api_key=DEMO_KEY&sort_hide_null=true&data_type=processed&recipient_name=drl+publications&two_year_transaction_period=2016&min_date=01%2F01%2F2015&max_date=12%2F31%2F2016&sort=-disbursement_date&per_page=30
https://www.fec.gov/data/disbursements/?two_year_transaction_period=2016&data_type=processed&recipient_name=drl+publications&min_date=01%2F01%2F2015&max_date=12%2F31%2F2016
Example 2 has a different cause: #3429
The text was updated successfully, but these errors were encountered: