Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.45 KB

README.md

File metadata and controls

56 lines (42 loc) · 2.45 KB

BAMS -> CLAMS Uploader Utility

This utility processes BAMS CSV export files exported using the BAMS Exporter and posts the entries as messages to an SQS queue (clams-nonprod-attendees-input-queue by default). It makes no differentiation between new and existing attendees and as such isn't all that efficient.

Building it

To build the uploader:

% go build uploader

Testing it

To test it use the example-data.csv file. Note you'll need to provide AWS credentials sufficient to write to SQS:

% ./uploader -csv example-data.csv -sqs clams-nonprod-attendee-input-queue -region=eu-west-2
Reading from example-data.csv and writing to clams-nonprod-attendee-input-queue
Queued message # 1  :  {123456 Cyder Punk [email protected] 29 0 04000000 01234 567 890 Fri 0 0 Milk allergy - but that's not a problem with vegan food :)}
Queued message # 2  :  {612297 Rudy Jenkins [email protected] 40 0 00000000 07811671893 Fri 0 1 None}
Queued message # 3  :  {BCDEF1 Ronald Chump [email protected] 40 0 00000000 01234 567 890 Fri 0 1 }
Queued message # 4  :  {CDEF12 Josefina Rodriguez [email protected] 29 0 01000000 01234 567 890 Fri 0 2 }
Queued message # 5  :  {DEF123 Random Guy [email protected] 29 0 00000000 01234 567 890 Wed 0 0 }
Queued message # 6  :  {EDCBAF Zak Mindwarp [email protected] 40 40 01000000 01234 567 890 Wed 0 0 I eat anything}
Queued message # 7  :  {EF1234 Undercover Agent [email protected] 29 0 03000000 01234 567 890 Fri 0 0 }
Queued message # 8  :  {FEDCBA Zak Mindwarp [email protected] 40 40 01000000 01234 567 890 Wed 0 0 I eat anything}

Using it with BAMS

To use it with BAMS copy the binary file to the same directory as your BAMS executable:

% cp uploader ~/path/to/BAMS/

Now go to BAMS, if you need to build all the binary files with:

% cd ~/path/to/BAMS/
% ./build.sh

Run BAMS (you will need to pass AWS credentials to the environment for the uploader to work within BAMS) and hit the F12 from the Home Screen. You should see some output like this:

Reading from attendees.dat and writing to example-data.csv
Total attendees exported to CSV is 001
Reading from  example-data.csv  writing to  clams-nonprod-attendee-input-queue
Queued message # 1  :  {123456 Cyder Punk [email protected] 29 0 04000000 01234 567 890 Fri 0 0 Milk allergy - but that's not a problem with vegan food :)}
.....