Import CSV to Database not able to insert data

Hi All ,

I am using Import CSV to Database smartservice to insert data to MySQL database table but data is not inserting I am getting following error


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[Data Store Entity:"7db49057-d16b-495d-9a26-a1156390fb73@451789"]' at line 1

 

C S V Document : I have referred a document in knowledge base (CSV file I have downloaded from the data base table ) 

Data Source Name : Given a constant which contain jdbc connection string

Delimiter: , and ; both these two I have tried

Table Name: I have created a constant which is of type Data store entity and referred the desired entity

 

Please correct me where I am doing wrong.

 

And also let me know this plugin will do update also i.e If I gave the data which is already exist for primary key value , will it update the data ?? or only insert it will do

 

Thank you,

Bhargavi

  Discussion posts and replies are publicly visible

Parents
  • Hi Bhargavi,
    Can you please try "Import Database Data from CSV" smart service present under Integration Services please. FYI, this service is same as the one you are using except the Delimiter input. This is working perfectly fine for me.
    Thanks,
    Smruti
  • Hi I have tried the smart service which u have mentioned but I am facing the same error can u please tell me how the data should be there in CSV document it should include column names in the starting or not and when exporting data do I need to add any delimiter or not.

    I have table with two fields i.e id and name . My CSV document is having data as follows is this fine or how my data should be in CSV document.

    "20180108001","bagi"
    "20180108002","bagi"
    "20180108003","shilpa"
    "20180108004","mani"
    "20180108005","mani"
    "20180108006","shilpa"
    "20180108007","hema"
Reply
  • Hi I have tried the smart service which u have mentioned but I am facing the same error can u please tell me how the data should be there in CSV document it should include column names in the starting or not and when exporting data do I need to add any delimiter or not.

    I have table with two fields i.e id and name . My CSV document is having data as follows is this fine or how my data should be in CSV document.

    "20180108001","bagi"
    "20180108002","bagi"
    "20180108003","shilpa"
    "20180108004","mani"
    "20180108005","mani"
    "20180108006","shilpa"
    "20180108007","hema"
Children
No Data