Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

tMySQLRow fails creating tables

Hey, 
I'm getting frustrated over a problem which I really underestimated. 
Hopefully I was just stupid an someone can help... 😃
Right now I am reading a lot of files an really don't want to generate all tables on my own. So in the beginnig I tried the built-in feature of the MySQLOut "create table if not exists". It somhow failed after a certain ammount of tables. I have no idea why. The exception said simply "table xyz does not exist" which is correct. But it wasn't created. 
Any way then I tried to create them before the actual data load.
I wrote the Query and checked it through the MySQL Console where it works perfektly. 
BUT the tMySQL is somehow stubburn and won't create the table.
Here's my query:
DROP TABLE IF EXISTS br189071noid;  
CREATE TABLE br189071noid (
ID int(9) NOT NULL AUTO_INCREMENT,
My_time DATETIME DEFAULT NULL,
Magnetventil_SA1_anst_ int(1) default NULL,
Magnetventil_SA2_anst_ int(1) default NULL,
Magnetventil_SA3_anst_ int(1) default NULL,
Magnetventil_SA4_anst_ int(1) default NULL,
Hauptschalter_DC_ist_EIN int(1) default NULL,
Systemtre__in_AC_Stellung int(1) default NULL,
AC_Netzspannung__eig_ZSG_ int(2) default NULL,
DC_Netzspannung__direkt_ int(4) default NULL,
HBU1__Eingangsspannung int(4) default NULL,
HBU1__ZK_Spannung int(5) default NULL,
HBU2__Eingangsspannung int(4) default NULL,
HBU2__ZK_Spannung int(5) default NULL,
n_Ist_Achse_1__K_Micro_ int(5) default NULL,
PRIMARY KEY (ID)  );

And here is what Talend comes up with....
Starte Job test1 am 16:33 30/12/2016.
connecting to socket on port 3804
connected
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 'CREATE TABLE br189071noid (
ID int(9) NOT NULL AUTO_INCREMENT,
My_time DATETIM' at line 2
disconnected
Job test1 endet am 16:33 30/12/2016.

I really don't get it and I've been trying for at least 2 hours now 0683p000009MACn.png.
I tried several combinations of creating a table but non worked for me.
Labels (3)
2 Replies
Anonymous
Not applicable

Hi 
Take a look at this KB article about how to execute multiple SQ statements with one tMysqlRow.
Regards
Shong
_AnonymousUser
Specialist III
Specialist III
Author

Hey, 
thanks for the reply. I haven't had time to look it up in the last days.
However I did today. The mysql Row has none such Parameter under Advanced.
But now that I know I just used two rows which shouldn't be a problem.
So thank you very much.