DOMO Import Problems

I am importing data using the API, Java.

I am only seeing 1 row of data!

 

Am I not ending the line properly?

What am I missing? What aren't my remaining rows of data getting loaded?

 

Here is my code:

String csvInput =
"\""+contact.getFirstName()+"\","+
"\""+contact.getLastName()+"\","+
"\""+contact.getPhone()+"\","+
"\""+contact.getCompany()+"\","+
"\""+contact.getEmail()+"\","+
"\""+contact.getID()+"\","+
"\""+contact.getDegree()+"\","+
"\""+contact.getBadge()+"\","+
"\""+contact.getMailStreet1()+"\","+
"\""+contact.getMailStreet2()+"\","+
"\""+contact.getMailCity()+"\","+
"\""+contact.getMailState()+"\","+
"\""+contact.getMailZip()+"\","+
"\""+contact.getMailCountry()+"\","+
"\""+contact.getRegistrationType()+"\","+
"\""+contact.getTitle()+"\""+"\\n\\";
dsClient.importData(DATA_SET_ID, csvInput);

Best Answer

  • mc1392
    mc1392 Member
    Answer ✓

    This is what works:

     

    csvInput += 
    "\""+contact.getFirstName()+"\","+
    "\""+contact.getLastName()+"\","+
    "\""+contact.getPhone()+"\","+
    "\""+contact.getCompany()+"\","+
    "\""+contact.getEmail()+"\","+
    "\""+contact.getID()+"\","+
    "\""+contact.getDegree()+"\","+
    "\""+contact.getBadge()+"\","+
    "\""+contact.getMailStreet1()+"\","+
    "\""+contact.getMailStreet2()+"\","+
    "\""+contact.getMailCity()+"\","+
    "\""+contact.getMailState()+"\","+
    "\""+contact.getMailZip()+"\","+
    "\""+contact.getMailCountry()+"\","+
    "\""+contact.getRegistrationType()+"\","+
    "\""+contact.getTitle()+"\"\n";

    Basically, each comma tells the API it's a new column.

    The less commas the better.

Answers

  • When I look in DOMO, on the data set page, I see this message:

    "The import has been cancelled because a new request has been submitted."

  • mc1392
    mc1392 Member
    Answer ✓

    This is what works:

     

    csvInput += 
    "\""+contact.getFirstName()+"\","+
    "\""+contact.getLastName()+"\","+
    "\""+contact.getPhone()+"\","+
    "\""+contact.getCompany()+"\","+
    "\""+contact.getEmail()+"\","+
    "\""+contact.getID()+"\","+
    "\""+contact.getDegree()+"\","+
    "\""+contact.getBadge()+"\","+
    "\""+contact.getMailStreet1()+"\","+
    "\""+contact.getMailStreet2()+"\","+
    "\""+contact.getMailCity()+"\","+
    "\""+contact.getMailState()+"\","+
    "\""+contact.getMailZip()+"\","+
    "\""+contact.getMailCountry()+"\","+
    "\""+contact.getRegistrationType()+"\","+
    "\""+contact.getTitle()+"\"\n";

    Basically, each comma tells the API it's a new column.

    The less commas the better.

This discussion has been closed.