Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a job that exports from mssql to a flat file using the dynamic schema. Its setup to pass in variables for the source table and then outputs to a flat file. for most tables it works fine, however when exporting others it errors out with a data conversion error on one of the columns. It seems this may be a bug in that the dynamic schema is seeing this datetime2(2) column as an int.
Hello,
In your Studio, you can open the Project Settings, dig into General > Metadata of Talend.
Could you please check if the default mapping file( mapping_<YourDB>.xml.) contain this type? And is this default precision "2"? You can try to configure that in mapping_<YourDB>.xml and there is improvement needed to make it fully dynamic.
Best regards
Sabrina
thanks for the reply. so the particular column I'm dealing with is datetime2(2) so I should change the defaultPrecision to 2 for that?
<?xml version="1.0"?>
<mapping>
<dbms product="SQL_SERVER" id="id_MSSQL" label="Mapping MSSQL"
default="true">
<dbTypes>
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
<dbType type="BIGINT IDENTITY" />
<dbType type="BINARY" ignoreLen="true" ignorePre="true" />
<dbType type="BIT" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" defaultLength="50" ignorePre="true" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
<dbType type="DATETIME2" ignoreLen="true" defaultPrecision="7" />
<dbType type="DATETIMEOFFSET" ignoreLen="true" defaultPrecision="7" />
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
<dbType type="DECIMAL IDENTITY" defaultLength="20"
defaultPrecision="10" />
<dbType type="FLOAT" ignorePre="true" />