Commit 9877d67d authored by Clinton Blackburn's avatar Clinton Blackburn
Browse files

Updated event export

- Added additional CSV columns
- Corrected date format (2-digit year)
parent bc1cfec6
Pipeline #250574090 passed with stages
in 16 minutes and 27 seconds
......@@ -56,7 +56,7 @@ def create_csv_row(db_row: Dict[str, Union[datetime.datetime, str]]) -> Dict[str
field_value = db_row[db_field]
if db_field in date_fields and type(field_value) is datetime.datetime:
field_value = cast(, field_value).strftime('%m/%d/%Y')
field_value = cast(, field_value).strftime('%m/%d/%y')
csv_row[csv_field] = cast(str, field_value)
......@@ -97,6 +97,17 @@ def main(file: typing.TextIO, start_date:, end_date:
field_names = [
'Last Name',
'First Name',
'Billing Street 1',
'Billing Street 2',
'Billing City',
'Billing State',
'Billing Zip',
'Billing Country',
'Purchase Date',
'Credit Card Type',
'Billing Email',
'Transaction ID',
'Authorization Code',
'Control Type',
......@@ -108,6 +119,11 @@ def main(file: typing.TextIO, start_date:, end_date:
'Registration Count',
'Registration Date',
'Instance ID',
'Request ID',
'Merchant ID',
'Last Four Digits',
'Billing Phone',
'SAP account',
writer = csv.DictWriter(file, fieldnames=field_names, quoting=csv.QUOTE_ALL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment