One Star Ben
One Star

adding a schema to tFileInputDelimited

Hello,
I have a simple job designed to read in three columns from a text file and populate a pre-defined table within a MySQL database but i am unable to work out how i add a schema to my input file (tFileInputDelimited)when using the Designer view within the repository. I have established my schema for both my input and output, so it simply that i cannot link it to the input process.
Any help is appreciated
Thank you
4 REPLIES
Employee

Re: adding a schema to tFileInputDelimited

Hi Ben,
You can automatically retrieve the schema of your delimited file provided you defined it in the Metadata repository.
The schema specified in input component properties is automatically propagated to the output component, so you don't need to specify the schema of tDBOutput component (or tMySQLOutput).
Considering that your Job is a simple Job including a tFileInputDelimited component and a tDBOutput or tMySQLOutput component.
In your tFileInputDelimited Properties view, change the Schema Type setting from "Built-in" to "Repository" (simply select it in the drop-down list).
See the screenshot attached, illustrating your job.
You can also import the Demo Project in which a lot of job samples and use cases are provided.
( FileDelimited -> MySQL for example ).
HTH
Regards
One Star Ben
One Star

Re: adding a schema to tFileInputDelimited

I have now amended my job to include "tMysqlOutput" as before i had used "tDBOutput" and also i have created the schema using the metadata wizard as you susggested. However, after i had completed this i am still presented with an alert that tells me that "No Schema has been defined yet" when i move my cursor over the "tFileInputDelimited" icon. i am sure that i am making a very basic error and would be grateful for any further help.
Regards
Ben
Employee

Re: adding a schema to tFileInputDelimited

Hi,
On which components have you taken a Schema, based on your metadata repository ?
Can you make screenshots about your Job, and properties of differents components.
See the following screenshots :
- Schema_AutoPropagate.PNG = edit schema of tMySQLOutput component. You can see the auto-propagation betweend tFileInputDelimited and tMySQLOutput.
- Schema_tFileInputDelimited.PNG = edit schema of tFileInputDelimited component. This schema is based on metadata repository (created by the Wizard).
- tFileInputDelimited_properties.PNG = properties of tFileInputDelimited
- tMySQLOutput_properties.PNG = properties of tMySQLOutput

Regards.
Community Manager

Re: adding a schema to tFileInputDelimited

Hi Ben,
Defining your schema in the Metadata area is one thing, but linking it with your input component is another step.
Double-click on your Input component, or click on the Properties tab then again the Properties view, to configure the Input row properties.
In the Schema type field (as well as Properties type, if you want to), select "Repository" (by default the setting is Built-in), then select the relevant Metadata Delim entry.
See screenshot attached as an example.
HTH
Elisa