4.23 CSV Header issue

618 views
Skip to first unread message

Rob Barnes

unread,
Jul 20, 2017, 2:53:27 PM7/20/17
to GAM for G Suite
Hello,

I'm having an issue where I'm trying to run a CSV bulk operation, and it seems that no matter what I do I get the following error -


 

gam csv /Users/******/gam/WorkdayID.csv gam update user ~Email Tech_Brands_Attributes.GME_Employee_ID ~ID


ERROR: Header "Email" not found in CSV headers of "".



I am at a bit of a loss as to why it is not finding the "Email" header in that CSV.  I have also tried making email lower case in the header and command to see if that made any difference (same with the ID part) but it does not make any difference.


Any suggestions?

Jay Lee

unread,
Jul 20, 2017, 2:55:12 PM7/20/17
to google-ap...@googlegroups.com
This indicates gam isn't reading the csv data as you expect. Can you try sending a sample csv file that has the issue either here or direct to me if it contains private data?

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/413b9259-3689-4d7d-a544-eaff973f41ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
Jul 20, 2017, 4:45:00 PM7/20/17
to google-ap...@googlegroups.com
Rob,

Generally this is because the lines in the CSV file are separated by a return (\r) not a linefeed (\n). How was your file created?

Ross

On Thu, Jul 20, 2017 at 11:55 AM, Jay Lee <jay...@gmail.com> wrote:
This indicates gam isn't reading the csv data as you expect. Can you try sending a sample csv file that has the issue either here or direct to me if it contains private data?

Jay
On Jul 20, 2017 2:53 PM, "Rob Barnes" <robby....@springmobile.com> wrote:
Hello,

I'm having an issue where I'm trying to run a CSV bulk operation, and it seems that no matter what I do I get the following error -


 

gam csv /Users/******/gam/WorkdayID.csv gam update user ~Email Tech_Brands_Attributes.GME_Employee_ID ~ID


ERROR: Header "Email" not found in CSV headers of "".



I am at a bit of a loss as to why it is not finding the "Email" header in that CSV.  I have also tried making email lower case in the header and command to see if that made any difference (same with the ID part) but it does not make any difference.


Any suggestions?

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.



--

Rob Barnes

unread,
Jul 21, 2017, 2:17:47 PM7/21/17
to GAM for G Suite
It appears that excel was not exporting to CSV properly.  I have done it this way in the past with no problem, so I'm not sure what the deal is on this one, but I copied and pasted the same info in to Google Sheets, then had Sheets export as a CSV and it seems to have resolved the issue.

Thanks for being willing to look in to it for me.


On Thursday, July 20, 2017 at 12:55:12 PM UTC-6, Jay Lee wrote:
This indicates gam isn't reading the csv data as you expect. Can you try sending a sample csv file that has the issue either here or direct to me if it contains private data?

Jay
On Jul 20, 2017 2:53 PM, "Rob Barnes" <robby....@springmobile.com> wrote:
Hello,

I'm having an issue where I'm trying to run a CSV bulk operation, and it seems that no matter what I do I get the following error -


 

gam csv /Users/******/gam/WorkdayID.csv gam update user ~Email Tech_Brands_Attributes.GME_Employee_ID ~ID


ERROR: Header "Email" not found in CSV headers of "".



I am at a bit of a loss as to why it is not finding the "Email" header in that CSV.  I have also tried making email lower case in the header and command to see if that made any difference (same with the ID part) but it does not make any difference.


Any suggestions?

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.

Alfredo Jesús Alva Lizárraga

unread,
May 14, 2018, 8:58:40 AM5/14/18
to GAM for G Suite
I have the same problem, Did the same as you but without good results.

gam csv usuarios.csv gam update user ~Email' org ~nuevoou

attach my csv

currently running last GAM
usuarios.csv

Ross Scroggs

unread,
May 14, 2018, 9:28:26 AM5/14/18
to google-ap...@googlegroups.com
Alfredo,

Your command: gam csv usuarios.csv gam update user ~Email' org ~nuevoou
has an incorrect ' in it, it should be: gam csv usuarios.csv gam update user ~Email org ~nuevoou

What platform are you on and how did you save the Excel data? If you're on a Mac, don't save the data as a CSV file but as a Windows CSV file; the line terminators are different.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.
<usuarios.csv>

Eric Dannewitz

unread,
May 14, 2018, 9:35:23 AM5/14/18
to google-ap...@googlegroups.com
First line of your csv needs to have the header fields

Eric Dannewitz 
Technology Assistant/district tech
Acalanes Union High School District
District Office Technology Department


Ross Scroggs

unread,
May 14, 2018, 3:38:57 PM5/14/18
to google-ap...@googlegroups.com
Alfredo,

In the latest version (4.40) this should work regardless of the line terminators in the file.

Ross

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

David Kirkham

unread,
Dec 11, 2018, 4:46:37 AM12/11/18
to GAM for G Suite
I'll leave this here for any future googlers!

I've just run into the same issue, in my case the csv was generated as a single column, without commas at the end of lines. I added a second column with no extra data in excel, resaved as a csv which introduced a series of commas, and it worked fine.
I don't know if it was the addition of the commas, or the resaving as a csv in excel (the original csv had been generated from the command line), but it then processed fine.
Reply all
Reply to author
Forward
0 new messages