-
Notifications
You must be signed in to change notification settings - Fork 3
Data structures by form (101,102)
Evgeny Pogrebnyak edited this page Jul 12, 2015
·
1 revision
- Archive files are downloaded from Bank of Russia web site. Latest format is RAR, earlier dates use ZIP.
- Each archive file contains two DBF files with form 101 data ("long" and "short" form). "Long" form has two extra fields ('IR' and 'IV'), which represent split of 'ITOGO' into domestic and foreign currency holdings.
- DBF filename timestamp is one month behind reporting date (082014 for 1.9.2014)
- DBF files are dumped into CSV files. When writing to CSV file 'SUM' rows are omitted with warning.
- CSV files are imported into bulk tables in raw database.
- Views of bulk tables truncate data by
regn
anddt
fields according to lists of banks and dates specified in other tables in database. We truncatef101
because full dataset is too big for quick data manipulations and testing. - Final table
f101
is union of a union of views on bulk tables. It is ready for transfer to final database.
Stage | Location | "Long" form | "Short" form |
---|---|---|---|
Source files | Archive (zip/rar) | 101-20140901.rar |
Same file |
DBF file | 082014B1.DBF |
082014_B.DBF |
|
Intermediate files | CSV file | bulk_f101b1.082014B1 |
bulk_f101_b.082014_B |
Raw database | Bulk tables | bulk_f101b1 |
bulk_f101_b |
Views on bulk tables | f101_part_f101b1 |
f101_part_f101_b |
|
Final form | f101 |
Same table |
Table fields
- Long form has IR, IV fields and short form doesn't
- NUM_SC renamed to CONTO as more explicit variable name
"Long" form | "Short" form | Final form | Data type |
---|---|---|---|
DT | DT | DT | date |
REGN | REGN | REGN | int |
NUM_SC | NUM_SC | CONTO | int |
A_P | A_P | A_P | int |
IR | - | IR | int |
IV | - | IV | int |
IITG | ITOGO | ITOGO | int |
- Scripts also allow to import locally saved text from files into database.
- From such a file a standard CSV dump is created. From this stage on the flow of data is same as with public files (loaded to bulk tables in raw database, added to
f101
using a view) - Fields are the same as in final table above.
Stage | Location | Private form |
---|---|---|
Source files | Text form | f101_09.txt |
Intermediate files | CSV file | bulk_f101veb.2014-09-01 |
Raw database | Bulk tables | bulk_f101veb |
Views on bulk tables | f101_part_f101veb |
|
Final form | f101 |