Comments (6)
Hi blag
yeas of course! I know such scenarios very well. We had such scenarios with database selects and when we had calculated the necessary queries it was terrible.
Thats because I have introduced the foreign key assignment to the tJSONDocOutput.
The idea is to read every level only once and not per parent node and add the current read object just to the right parent object.
The first flow have to got over the first level nodes.
Mark the column which is the key s key in the schema.
The components provides a list of the keys as SQL-comma separated list.
In your scenario you do not need this.
You have to have in your files for the second and following levels columns which references to the parent level.
You choose such this column per level and tell the component to use it a foreign key relation.
This is a screenshot of such a job which fetches the data level by level.
Here the setting for one of the second level components:
from talendcomp_tjsondoc.
I'm definitely going mad on this one...
The FK mode can't find my key and blow-up every time.
I think the point is really about making a composite key that tell the region1
in paysA>region1>depA1
is not the same than paysB>region1>depB1
If I disable the 3rd CSV/output (departments level), I'll have 1st and 2nd level as I want, but the 3rd and deeper level either go on error on CODCOURT2=00
or use CODCOURT2
as a unique key and put everything in the last occurrence of the key (aka all my default departments for the world end up in the Zimbabwe default region...)
from talendcomp_tjsondoc.
I agree with you, the limitation to only one key field is not comfortable. Mostly we found easy ways to build one combined key. I use the component tHashRow to do that (the result of a cooperation with some friends): https://github.com/jlolling/talendcomp_tHashRow
We have developed this component for the purpose of building keys for a Data Vault.
from talendcomp_tjsondoc.
I you have further more problems with it we can do a skype session and I take a look at your jobs and we fix everything together.
from talendcomp_tjsondoc.
Thanks again Jan,
As I've got your confirmation tJSONDoc was not able to handle native composite key, I was able to try other things and find how to do it.
I'm working on a Plateform version, so I used tGenKey
to make a composite key as a single column instead of your tHashRow
. My fear was having to ship this pk_key in the generated JSON dump, but it even seem to work without!
I'm now able to make my 2h30 job in less than 120s, quite a nice change~
I'll add some screen-shot tomorrow.
from talendcomp_tjsondoc.
I know very well whats your pain. We have created web services with these components and those web services have to provide a multi-object response, e.g. 1000 products at once in one response.
It was terrible - we had minutes instead of seconds as response time. With the foreign key solution we was able to reduce the response time from 2-3 minutes to 1-2 seconds.
I have thought about combined keys but this what increase the complexity of the component to a not maintainable level.
from talendcomp_tjsondoc.
Related Issues (20)
- Improve Error message from Validation HOT 3
- Add `Die on error` feature HOT 3
- Error type on tJSONDocOpen/Save HOT 3
- SLF4J: Class path contains multiple SLF4J bindings HOT 8
- tJSONDocOpen HOT 1
- Value if attribute is missing HOT 2
- tJSONDocOpen/Save: Read JSON schema from file HOT 1
- Schema Validation: Allow filtering of rejects HOT 3
- POM build fails due to missing dependency `talend-job-mock` HOT 1
- failure while streaming multiple array elements HOT 2
- CREATING JSON FORMAT IN TALEND (LOOPS AND ARRAYS IN SIDE AN OBJECT) HOT 2
- support for log4j2 HOT 1
- Json Schema validator can't find the type mismatch error with sting in INT field HOT 7
- Is it working on version 7.3 of Talend Open Studio for Data Integration HOT 2
- tJSONDocInputStream error HOT 5
- de.jlo.talendcomp.json.JsonDocument nβest pas reconnu comme type valide HOT 7
- [tJSONDocInputStream] Trouble with backslashes in json field HOT 9
- IllegalStateException:Cloned objects detected! Use the latest Jayway library 2.2.1+ HOT 3
- There is an issue with the content of the rows listed in tJSONDocInputStream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talendcomp_tjsondoc.