Add local_census_records importation model
This model without database allow us to validate incoming file extension and headers and also does the following during importation process: * Ignore empty rows * Classifiy rows in two groups: created_records, invalid_records
This commit is contained in:
committed by
Javi Martín
parent
0239efef9d
commit
615bfadca8
5
spec/fixtures/files/local_census_records/import/invalid.csv
vendored
Normal file
5
spec/fixtures/files/local_census_records/import/invalid.csv
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"document_type","document_number","date_of_birth","postal_code"
|
||||
,"44556678T","07/08/1984",7008
|
||||
"DNI",,"07/08/1985",7009
|
||||
"Passport","22556678T",,7010
|
||||
"NIE","X11556678","07/08/1987",
|
||||
|
5
spec/fixtures/files/local_census_records/import/valid-without-headers.csv
vendored
Normal file
5
spec/fixtures/files/local_census_records/import/valid-without-headers.csv
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
,,,
|
||||
"44556678T","DNI","07/08/84",7008
|
||||
"33556678T","DNI","07/08/84",7008
|
||||
"22556678T","DNI","07/08/84",7008
|
||||
"X11556678","NIE","07/08/84",7008
|
||||
|
5
spec/fixtures/files/local_census_records/import/valid.csv
vendored
Normal file
5
spec/fixtures/files/local_census_records/import/valid.csv
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"document_type","document_number","date_of_birth","postal_code"
|
||||
"DNI","44556678T","07/08/1984",7008
|
||||
"DNI","33556678T","07/08/1985",7008
|
||||
"DNI","22556678T","07/08/1986",7008
|
||||
"NIE","X11556678","07/08/1987",7008
|
||||
|
Reference in New Issue
Block a user