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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

HOW I Can import JSON Fille and load it in table sql server

I need some help in resolving below issue ; i'm new to talend .My requirement is to  reqd input Json and convert it into table sql server , i want to load key column as a separate column so that i can search easily based on key.

I had a requirement where i need to take data from json file and load it in table (sql server).I join the photo of my job
can anyone please help me

I am using "Talend open studio for data integration version 7.1.1.2018102681147

Thank you very much for your time and help 

Labels (3)
8 Replies
bhagyarekha
Creator II
Creator II

HI

can you elaborate your issue where you are getting struck?

it would be better if you provide us with examples

Regards

rekha

Anonymous
Not applicable
Author

You seem to be going in the right direction. What is not working? What is the tMap at the beginning for? It splits the flows, why does it do this?

Anonymous
Not applicable
Author

my issue is : Database connection is failed.
java.lang.RuntimeException: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:204)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1139)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:315)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:301)
at org.talend.designer.core.ui.editor.properties.controllers.DbTableController.checkConnection(DbTableController.java:769)
at org.talend.designer.core.ui.editor.properties.controllers.DbTableController$6.run(DbTableController.java:558)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)
... 6 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:952)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822)
... 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:173)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
... 14 more

 

Regards

Anonymous
Not applicable
Author

i join tmap schema 


tmap.PNG
Anonymous
Not applicable
Author

also when I execute it goes up this error
unable to find or load the main class vulnmanager.test3_0_1.test3 vulnmanager is name my project et test3 is name my job

thanks you 


finaleror.PNG
Anonymous
Not applicable
Author

Looks like database connection issue

 

I suggest : 

1. you first make sure you are able to extract the information from the json file correctly. you can output using tlogrow

2. then you move to the next step: that is trying to insert the data in the database

 

 

Anonymous
Not applicable
Author

I agree with @dgm01 but would add that it is a good idea to test out your DB connection with a t{DB}Input component.

Anonymous
Not applicable
Author

thanks for attention;  but i can't to extract the information from the json file correctly

How I would like the output to look like:

CVE Scope debainbug description status fixed_version urgency
             

I attach  my jsonfille

regards


inputfille.docx