HTML In DataStage / Blogs / Perficient


We use different formats (sequential, XML, etc.) as a source or target in ETL jobs. In some cases HTML is needed to create the output file.

What is HTML?
HTML (Hypertext Markup Language) is a text-based approach and the foundation of a website. It is the backbone of a website that creates content in a structured and organised manner. HTML also provides a creative outlet for those who are interested in design and allows content to be structured to be easily accessible.

HTML Files/Documents:
HTML documents help to present the data in an organised manner; that is, they include images, headings, paragraphs, links, a footer, etc.

HTML documents are different from text files (ordinary files).

  1. In an HTML file, we can change the format as per our requirements, but in a text file,we can’t
  2. HTML is capable of embedding media, videos, etc., but text files aren’t.
  3. HTML commonly uses the internet to view the document, but text files have a wide variety.
  4. HTML also uses text.

The HTML file size is greater than a normal text file as HTML uses tags.

Basic Structure of an HTML File:-

<html> (Header)

<body>
Write HTML tags
</body>
</html>

Like the sequential file component, the HTML file component is not available directly in the DataStage tool, we design the job and use it as a feature in the DataStage ETL tool.

Below are the following four components used to create the job to create a file in HTML format:
1. Row Generator
2. Transformer
3. Funnel
4. Sequential File

Here are the steps one needs to follow to create a file in DataStage

Procedure: –

  1. Drag and drop the components from Palette: Row generator, Oracle Component,     Transformer, Funnel and for output   File.
  2. Connect the row generator with the transformer, the Oracle component with the transformer, then the funnel, and produce the output sequential file.
    First

 

 

 

Design the job to create the HTML file, as an HTML file consists of a header, body, and footer.

Configuration of the components:
1. Use the row generator component to create the first header of the HTML file and set properties as below: –

Second

Third

Link the Row Generator to Transformer and set the properties as below:-

Fourth

Fifth

 

Then Oracle component configuration as below: –

Sixth

Seventh

For HTML Footer, again use Row Generator and connected to Transformer as below: –

Eighth

Nineth

Transformer linked to Row Generator: –

Tenth

Then above all multiple links connected to funnel to produce single output

Configuration Of Funnel: –

Eleventh

As need to generate HTML File(Header, Body and Footer) so set as  Sequence funnel type in Properties of Funnel

Link the funnel to Sequential output file and configuration as below: –
Twelveth

Thirteenth

Execute the job:-

Procedure:-
1. Save the job (Ctrl + s)
2. Press (Ctrl+F5) to run the job and will get below output: –

Monitordetails

Conclusion: –
As mentioned above, we can establish an HTML file feature in DataStage.

HTML files are structured and constructed in a specific way. When we compare an HTML file to a text file, it offers advantages.HTML files can contain videos, media, and other elements that allow users to see the content more effectively. This HTML feature is generated by a task that already has a Sequential file with its own property. We can call above job and use in DataStage as the child job.

Happy Learning..





Source link

Social media & sharing icons powered by UltimatelySocial
error

Enjoy Our Website? Please share :) Thank you!