create varchar sequence in ADF throw ORA-01722 - oracle-adf

Friends i am working on jdev12c but i am facing issue i am able to create new record using bc4j tester but when i am trying to change(update) existing data it throws exception Invalid NumberError while selecting entity for CustmerInfo: ORA-01722: invalid number
I have searched for this error but i am not able to get solution just to provide more information I have one master and 2 child tables.In master table i have 2 column which uses DBSequence(seq and trigger from database) and one mandatory date field(timestamp).
I have found out the reason actually the customernumber column is varchar because i am concatenating the sequence with prefix and then storing it.now the problem is as soon as i change entity attribute to DBSEQUENCE it throws invalid number error for updation

DBSequence should only be used if the value you are getting is populated form a DB Sequence - which would be a number.
If you are manually populating that field - then use a regular String type for the field.

Related

Converting data in column in SSIS

I'm writing an SSIS package to load data from a .csv into a db.
There's a column in the csv file that is supposed to have a count, but the records sometimes have text, so I can't just load the data in as an integer. It looks something like this:
I want the data to land in the db destination as an integer instead of a string. I want the transformation to change any text to a 1, any blank value to a 1, and leave all the other numbers as-is.
My attempts have so far included using the Derived Column functionality, which I couldn't get the right expression(s) for it seems, and creating a temp table to run a sql query through the data, which kept breaking my data flow.
There are three approaches you can follow.
(1) Using a derived column
You should add a derived column with the following expression to check if the values are numeric or not:
(DT_I4)[count] == (DT_I4)[count] ? [count] : 1
Then in the derived column editor, go to the error output configuration and set the error handling event to Ignore failure.
Now add another derived column to replace null values with 1 :
REPLACENULL([count_derivedcolumn],1)
You can refer to the following article for a step-by-step guide:
Validate Numeric or Non-Numeric Data in SQL Server Integration Services without the Script Task
(2) Using a script component
If you know C# or Visual Basic.NET, you can add a script component to check if the value is numeric and replace nulls and string values with 1
(3) Update data in SQL
You can stage data in its initial form into the SQL database and use an update query to replace nulls and string values with 1 as follows:
UPDATE [staging_table]
SET [count] = 1
WHERE [count] IS NULL or ISNUMERIC([count]) = 0

How do i solve this SISS thing?

TITLE: Microsoft Visual Studio
Error at Data Flow Task [Union All [303]]: The metadata for "Union
All.Inputs[Union All Input 3].Columns[Title]" does not match the metadata for
the associated output column.
Error at Data Flow Task [Union All [303]]: Failed to set property
"OutputColumnLineageID" on "Union All.Inputs[Union All Input
3].Columns[Title]".
ADDITIONAL INFORMATION:
Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)
BUTTONS:
OK
I keep getting this error when i try to do data conversion and then try to do union... This is because, if you know, the data conversion, will create new columns. SO when i try to do union with them, it will get the bove error.
you have to delete and re-add those connections between sources and union.
I had the same problem once and what I did was as follows:
1)Double click the respected data-conversion which faulty data is passing through
2)Check to see if all the data types for you columns are matching with the data type of same column from your other data-conversion.
3)Fix if there is any difference
And this will fix it for you, as it did for me.
Double click the UNION ALL component to display the output Column Names.
Change Union All Input 1 and the Union All Input 2 to
Rename you column and add a new column with the right name and the right data.
Now you have the right column with the right types,you can delete your old renamed column.
Don't forget to update the derived column and destination compnenent. The will be updated automatically with the unwanted renamed column. Just configure the right column in these component and refresh. all will be right.

cannot read the next data row for dataset

I get a error message I preview my report. I had to change my credentials for data server and changes the column names, but I didn't make any changes to the query. I get this error messages when I preview my report
An error occurred during local report processing. An error has
occurred during report processing. Cannot read the next data row for
the data set. conversion failed when converting from a character
string to uniqueidentifier.
I have two parameters both take number values so, I have them setup as text values. I have one more filter converting it to int. I changed my parameters to int and removed to filter to see if it worked, but I still get the same error message. The report worked when I ran it through my other credentials, I don't know why it giving me an error message now.
As The error already pointing out, you have character data type which cannot be converted to unique identifier type.
you have data type mismatch

Failed to convert property value of type 'net.sourceforge.jtds.jdbc.ClobImpl' to required type 'java.lang.String'

I have the one table in sql server with one field annoation as text data type.
I have used spring jdbc template to get the annotation text field data and then I have used Following API (BaseRowMapper) to map table column to java pojo.
below is my table structure:
While retrieving data I am getting below exception.
org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'net.sourceforge.jtds.jdbc.ClobImpl' to required type 'java.lang.String' for property 'annotation'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [net.sourceforge.jtds.jdbc.ClobImpl] to required type [java.lang.String] for property 'annotation': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:464)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:495)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1099)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:884)
at com.ecw.vascular.model.BaseRowMapper.mapRow(BaseRowMapper.java:39)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:651)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:589)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:639)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:664)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:704)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:179)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:185)
at com.ecw.vascular.dao.BaseDao.executeQuery(BaseDao.java:113)
at com.ecw.vascular.dao.ObservationDao.findByPatientAndEncounter(ObservationDao.java:64)
The problem lies on the datatype used in the SQL Server database to store a String of maximum 16 byte.
Text can store up to 2 GB of variable width character string data, so JDBCTemplate uses a CLOB to retrieve the data from that column.
Since the maximum length is 16, one solution can be to change the datatype on the database to a more appropriate varchar.
If this is not an option and since the error mentions a jtds implementation of CLOB, you can try to change the jdbc connection string to
jdbc:jtds:sqlserver://ServerName;**useLOBs=false**;DatabaseName=xxx;instance=xxx
A third-highly not recommended - option would be to use a CLOB instead of a String inside the java bean, with all the relative changes needed to deal with databases LOBs.

Error: Unknown duplicates value on record with id

I'm trying to Upsert the data to Account object using an external tool, Everything works fine but Salesforce is throwing error for few records when upserting.
I was doing the upsertion process using the external id field. Except external id field no other field is having a unique constraint.
I'm getting the following error -
SF_ERROR: DUPLICATE_VALUE
OBJ: Account - duplicate value found: unknown duplicates value on record with id: 001***********
Please help me to solve the issue.
This is happening because your trying to create Salesforce contact multiple times with same email and data
It's silly but this was happening to me because SFDC considers 'NULL' as a unique value... Mostly because Excel converted 'NULL' to text and was trying to bring in the literal word 'NULL'.

Resources