Where to put flatpack config file ?

One Star

Where to put flatpack config file ?

Hi,
I have to use a flatpack for a fixed-sized file ; according to camel and talend flatpack documentation (https://help.talend.com/search/all?query=Flatpack+Component&content-lang=en) I have to create a config file to define columns.
In the Studio, where do I put the config file, and how do I reference it in flatpack URI ?
Best regards,
Christophe
Employee

Re: Where to put flatpack config file ?

Hi Christophe,
In the 'Mediation' Perspective (Route Builder):
1) add your config file to to 'Resource' node (right mouse click on the resources allows you to import it)
2) add this resource to your route (use also right mouse click on you route to do this)
3) use classpath:// {your resource name} to refer this resource.
Haven't really tried it but this is the way it works for nearly all components as long as they support to get the resource from the classpath at runtime (which is the case for all / most camel components.
When you export or publish your route the flatpack config file will automatically added by our studio to export (kar/jar files) and is accecible for the component by this using the classpath:// (instead of an external file file:// )
HTH,
Dietmar
One Star

Re: Where to put flatpack config file ?

Thanks for your response.
I can not find how to do point 2.
When I export in .kar archive file, the resource is not present in classpath.
Is there a best-practice way to give name to resources ?
My URI is
"flatpack:fixed:classpath://sicta-flatpack-config?splitRows=true"
Best regards,
Christophe
One Star

Re: Where to put flatpack config file ?

Ok, I've solved everything, it now works perfectly.
Thanks a lot,
Christop?e

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read