I need someone to create a cron job, which downloads the csv file (.gz file actually) found here [url removed, login to view] and inserts it into a postgresql database. After that an email needs to be sent from our linux server, with a report of how many rows were inserted and how many rows failed. 0 rows should fail. Please utilize the appropriate column types (not all varchar).
Please do not include the following columns:
AddressOfficialAddressLineText AddressPostalValidFromDate AddressPostalMunicipalityCode AddressPostalStreetCode AddressPostalStreetBuildingIdentifier AddressPostalStreetName AddressPostalFloorIdentifier AddressPostalSuiteIdentifier AddressPostalDistrictSubdivisionIdentifier AddressPostalPostOfficeBoxIdentifier AddressPostalPostCodeIdentifier AddressPostalDistrictName AddressPostalStreetBuildingIdentifierTo AddressPostalRegionCode AddressPostalAddressLineText
And any columns, which names ends with "ValidFromDate".
Please create a free test database at [url removed, login to view] with a 10000 row limit for this project.
Your solution should "just work". The cron job should run and the db should get deleted and re-created. Please use a temporary secondary table which will replace the "live" table once it has been confirmed that all all rows were successfully inserted, so we do not risk that a failure will leave us with no data.