Data In
|
Loader requires contacts.csv file in directory /data/in/tables/contacts.csv .
The CSV file contacts.csv must include a header with the following fields:
- Emails
- PhoneNumbers
- ZipCodes
- FirstName
- LastName
- CountryCode
Either all or none of FirstName, LastName, CountryCode, and ZipCodes have to exist. They cannot partially exist.
All phone numbers must be formatted using the E.164 format and include the country calling code.
The Emails, PhoneNumbers, and ZipCodes must be dumped as JSON lists.
with open('contacts.csv', 'w') as csvfile:
contacts_writer = csv.writer(csvfile)
contacts_writer.writerow(['Emails', 'PhoneNumbers', 'ZipCodes', 'FirstName', 'LastName', 'CountryCode'])
contacts_writer.writerow([json.dumps(["test1@meiro.io", "test2@meiro.io"]), json.dumps([])])
Example of CSV file:
Emails,PhoneNumbers,ZipCodes,FirstName,LastName,CountryCode
"[""test1@meiro.io"", ""test2@meiro.io""]",[],,,,
|