Today i came across an issue in informatica code which i have figured out the solution for it. But i don’t have a proper justification and not sure if my solution is a proper fix.
Here is the summary of my issue:
Source: Flatfile (Fixed Width)
Source Field Datatype: String 14
Target: SQL Server Table
Targer Field Datatype: Decimal (14,2)
Old Logic
IIF (TO_DECIMAL(FIELDNAME),TO_DECIMAL(FIELDNAME)/100,NULL)
Bad data
00002631064132
Error
Message: Transformation Evaluation Error [<> [TO_INTEGER]: integer overflow
... i:TO_INTEGER(f:TO_FLOAT(d2:TO_DECIMAL(u:'00002631064132',i:-100)),i:0)]
Updated Logic
IIF(NOT ISNULL(LTRIM(RTRIM(FIELDNAME))),TO_DECIMAL(FIELDNAME)/100,NULL)
Output
26310641.32 (Loaded as Expected)
Issue Summary
We have the initial logic (Old Logic) which converts the string to decimal(14,2).
This code has been running without any issues since from a while. But today this load has failed with integer overflow (Error).
I have changed the logic as show in the picture(Updated logic) and it loaded the data successfully with expected output(Output).
My doubt is why there is to_integer, to_float showed up in the error when i’m not using anywhere in my mapping. I’m looking for proper justification for this fix.
Any thoughts?
Thanks in advance!!
What is the data type of the variable/output port where you are logic is defined ?
Also can you provide the input data that was causing this issue ?
Related
I've run into an challenge/posible incompatibility between gatsby-source-graphcms and gatsby-plugin-react-i18next, for which there appears to be virtually no information online and I'm wondering if anyone else has encountered this before please.
I'm working on adding localisation to a site which uses gatsby-source-graphcms and the Gatsby File System Route API to build pages dynamically. Everything was going fine, until I tried to use the $language GraphQL query variable made available by gatsby-plugin-react-i18next with the locale filter field in GraphCMS, which yielded this error message:
Variable "$language" of type "String!" used in position expecting type "GraphCMS_Locale"
The one and only reference I've been able to find to a similar issue was on GraphCMS' public Slack, where someone referred to abandoning gatsby-source-graphcms I favour of gatsby-source-graphql due to this. However I'm hesitant to do this, as that would basically means re-writing the entire site for me! 😢
I've been trying to find some way to feed the page query a second variable, which duplicates the value $language variable from gatsby-plugin-react-i18next but is declared as the correct data type for GraphCMS, or perhaps to somehow cast the string to GraphCMS_locale but have had no luck so far.
Has anyone found a way to make gatsby-source-graphcms play nicely with gatsby-plugin-react-i18next please?
The WIP code for this can be seen here: https://github.com/binghamchris/paddelbuch/blob/feature-i18n/src/pages/index.js
Apologies if the code is a bit bad somewhere. I'm not a web dev (this is a community project I'm volunteering on, where there's no professional web devs) and am really just hacking away on copy-and-paste code 😉
Thanks in advance for any help anyone can offer
I found a super hacky workaround, inspired by #notrab's kind help, in case it helps anyone else:
I added the following to gatsby-node.js:
exports.createSchemaCustomization = ({
actions: { createTypes, printTypeDefinitions }
}) => {
createTypes(`
type Locale implements Node {
language: GraphCMS_Locale
}
`);
};
This changes the GraphQL data type on the language field in the i18next translation data to GraphCMS_Locale, which then means both data types needed by both gatsby-plugin-react-i18next and gatsby-source-graphcms match... and so far it seems to be working in dev mode!
New to Camel. I'm trying to get the current DateTime to be a part of a filename. The key bit is here:
.to(s"sftp://$sftpStr/&fileName=MyFile_${date:now:yyyyMMdd}.csv&noop=true")
sftpStr contains the relevant path. But the Date expression throws an error on compilation. I'm sure it's something simple and stupid I'm doing, but it's not clear to me why this doesn't work.
There is a related thing I don't understand, which might help give context to my confusion. I tried this:
.log(LoggingLevel.INFO, LOG.getName, s"Route Started! Time = ${date:now:dd-MM-yyyy HH:mm:ss z}")
which threw an error. But I took away the s tag in the string, and it worked fine. I thought the s just signaled to read the string that follows as a simple expression.
To reiterate, basically just looking to capture the current date/time in a filename (and I can't just create a variable using, say, java.time.LocalDateTime.now() or whatever for reasons too annoying to get into). I included the bit about the log to hopefully contextualize my confusion.
Thanks!
In the statement that you write the problem i believe is $sftpStr. I think that this cannot be resolved.
If $sftpStr is a property then you should use {{$sftpStr}}.
If it is header then you should use ${header.sftpStr}.
I propose to use headers for both folder and file name. Something like:
from(...)
...
.setHeader("folder", constant("the value"))
.setHeader("CamelFileName", simple("${date:now:yyyyMMdd}"))
.to("sftp:username:password#{{ftp.server}}/${header.folder}&noop=true");
In the above ftp.server is a property that holds the SFTP host.
Hope that will help.
For the last couple of days I’ve been battling with an issue which I believe is derived from a change in the source code in Thorntail and unfortunately this code doesn’t appear to be publically available.
The error I’ve been receiving is this:
"WFLYCTL0105: max-pool-size is invalid in combination with derive-size".
Previously you could just leave a “derive-size” out of the configuration and there wasn’t an issue however now anytime I’ve included the “max-pool-size” no matter what the combination with “derive-size” it fails with the above mentioned error.
From the latest Thorntail dococumentation:
Specifies if and what the max pool size should be derived from. An
undefined value (or the deprecated value 'none' which is converted to
undefined) indicates that the explicit value of max-pool-size should
be used.
This is what I had previously in WildFly project-defaults.yml which worked perfectly fine:
ejb3:
default-resource-adapter-name: activemq-rar.rar
default-mdb-instance-pool: mdb-strict-max-pool
strict-max-bean-instance-pools:
mdb-strict-max-pool:
max-pool-size: 1
Any ideas or examples would be greatly appreciated.
More information added in response to questions:
The project was updated from using WildFly Swarm 2018.4.1 to use Thorntail 2.2.0.Final.
The code that appears to have changed in Thorntail is below:
OLD code:
https://github.com/stuartwdouglas/wildfly-swarm-core/blob/master/ejb/api/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java
.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").maxPoolSize(20).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
New Code:
https://github.com/thorntail/thorntail/blob/802e785fdd515ecc1b52b22a64a6ff9338dace29/fractions/javaee/ejb/src/main/java/org/wildfly/swarm/ejb/EJBFraction.java
.strictMaxBeanInstancePool(new StrictMaxBeanInstancePool("mdb-strict-max-pool").deriveSize(StrictMaxBeanInstancePool.DeriveSize.FROM_CPU_COUNT).timeout(5L).timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit.MINUTES))
If anyone has a link to the above source code that would be great. The only links I can find appear to be from JBOSS so the code looks like it was ported accross and not made publicly avaiable.
After the question update: the default configuration of a couple of fractions was changed to better align with default configuration in WildFly 11. You can configure derive-size: null and then the max-pool-size should take effect.
Something like:
ejb3:
default-resource-adapter-name: activemq-rar.rar
default-mdb-instance-pool: mdb-strict-max-pool
strict-max-bean-instance-pools:
mdb-strict-max-pool:
derive-size: null
max-pool-size: 1
(Note: previously, this answer recommended setting derive-size: none, but that doesn't work. After the discussion in comments, I changed the answer to recommend derive-size: null, which does work.)
I use a very specialized database called RabDB (http://www.rabdb.org). From the project website:
RabDB is a database created to explore the universe of the Rab family of small GTPases, key regulators of the Eukaryotic endomembrane system, predicted by the Rabifier classification pipeline in the sequenced eukaryotic genomes.
However, I run into a beginner problem: Upon submitting a query in the RabDB browser at http://www.rabdb.org/browser/profile, I only receive the following Response:
Error #9999. Please look under the table.
This is very easy to solve: You need to implement a transformer called "tiny turbo changer". It's based on series 2 and can be used starting from 6+.
Hope that helps.
Thanks!
I just installed Bugzilla locally and it seems that everything is fine. I can create new products and components. I can also file new bugs and they show up in the database.
But when I want to view them in the web interface, they won't show up.
Instead, at the top of the page this shows up:
Product: ARRAY(0x3735378 Component: ARRAY(0x4275650) Resolution: ARRAY(0x42755a8)
and then below the "Zarro Boogs found."
I couldn't find any information on that on the web, did anybody have similar issues? Thank you!
Please check the bugs table in techzilla database and verify if the bug details are getting updated.
The cgi file which corresponds to the listing of bugs is buglist.cgi.
Template file is:-global/message.html.tmpl
"Zarro Boogs found." is showing because, the values are not correctly entering in the query to display the buglist.
It is evident from the display,
Product: ARRAY(0x3735378 Component: ARRAY(0x4275650) Resolution: ARRAY(0x42755a8)
it is because of the looping problem.
check the display code in the template file or buglist file and correct the loop, then it will dsiplay properly
Jenifer,
Yes, It is because of the zero value in the query. We can check it, by printing the query and checking the value in DB.
Inserts a Named Query (a "Saved Search") into the database, or updates a Named Query that already exists..
We had similar problem. Bugs were not showing in search result list. The problem was in the name of the product when the name of the product was with diacritics (e.g. Czech, Slovak, etc...). When the name of the product is in US ASCII it is all Ok.