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

[tMsSqlOutput] using default schema value at insert

I used the component tMsSqlOutput to insert values coming from a tMap.
My tMap and tMsSqlOutput  components use the same schema who defined default value for many columns.
When I try to insert values, Talend throw me an exception "Impossible to insert null value". Normal because in my dabase, this column is not nullable, but my component did not use the default of my schema value like I want.

How can I force to use default value define in my schema.

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Have you tried to remove from the tMap the column in which you want to insert the default value?
Anonymous
Not applicable
Author

I can't remove values from my tXMLMap because of these reason :
[list=*]
  • my tXMLMap is build from tFileInputXML where some value are nullable and can not exist in my XML file but are no nullable in my table.

  • Even if tXMLMap does not link some values with the tFileInputXML, i must let appear values for our integration service which can adding some other component and linking thoses one.


  • for detail my job is very simple and is build like that

    tFileInputXML ->main-> tXMLMap ->main->tMSSqlOutput

    All values in my tXMLMap can exist in my XML file but if not, i must use the default value define in the schema.
    Anonymous
    Not applicable
    Author

    I see that on the post below


    Note
    At present, only tFileInputDelimitedtFileInputExcel, and tFixedFlowInput support default values in the schema


    https://help.talend.com/search/all?query=How+to+set+default+values+in+the+schema+of+an+component
    Will tMSSqlOutput and other component support replace null value by default schema value ?
    The solution of my problem now is to set all table columns nullable and redifine null by default value with an insert trigger. It look so bad but, i have not other solution.