• nikhilesh@helicaltech.com
  • +91-7893947676

Helical IT Solutions Pvt Ltd

One stop destination for all your BI, DW, Big Data needs

MENUMENU
  • Products
    • Helical Insight
    • Ask On Data
  • Services
    • AWS Quicksight Consulting
    • AWS Glue Consulting
    • Jaspersoft Consulting
    • Talend Consulting
    • Pentaho Consulting
    • Tableau Consulting
    • Pentaho Data Integration
    • Big Data Analytics
    • Data Lake Consulting
  • AI & Analytics
    • Generative AI Services
  • Modern Data Stack
    • DBT Services
    • Airflow Services
    • Airbyte Services
    • Databricks Services
    • Snowflake Services
  • Company
        • About Helical IT Solutions Pvt Ltd

          Helical IT Solutions Pvt Ltd, based out of Hyderabad India, is an IT company specializing in Data Warehousing, Business Intelligence and Big Data Analytics Services. Helical IT Solutions Pvt Ltd can help you in providing consultation regarding selecting of correct hardware and software based on your requirement, data warehouse modeling and implementation, big data implementation, data processing using Apache Spark or ETL tool, building data analysis in the form of reports dashboards with other features like data security, alerting and notification etc. Helical IT Solutions Pvt Ltd can use open source tool leading to low cost of ownership or your favorite proprietary tool to build the solution that you are looking for.

          • About
          • Careers
          • Contact
          • Engagement Models
          • Clients
          • Blog
  • Clients
  • Contact
        • Location

          View larger map
          • Helical IT Solutions Pvt Ltd.
            Somajiguda, Hyderabad

          • nitin@helicaltech.com
            nikhilesh@helicaltech.com

          • +91-7893947676

        • Contact Us

      • Search what you are looking for..

    Redirecting Talend Console Logs to File

    Posted on February 21, 2014 by By Nikhilesh, in Business Intelligence, ETL, Talend | 0

    Redirecting Talend Console logs to file

    Talend Open studio for data integration does not have any component to redirect console trace to a file. This blog post provides the solution for Redirecting Talend Console logs to file and is very easy to follow and extend. In previous article logging-using-talend we have seen how to customize Talend logs. This article shows how to redirect Talend console logs to file. In talend exchange, there is a custom component to perform similar job.

    Make data easy with Helical Insight.
    Helical Insight is the world’s best open source business intelligence tool.

    Get your 30 Days Trail Version

    Solution



    Redirecting Talend console logs is required by almost all Talend projects. This is very easy to implement in talend. Use tJava component at the start of any job and enter following lines into it.

    Redirecting Talend Console logs

    Redirecting Talend Console logs

    java.io.File folder = new java.io.File(“_logs/”);
    if (!folder.exists()) {
    if (folder.mkdir()) {
    System.out.println(“Directory is created!”);

    }
    else {
    System.out.println(“Failed to create directory!”);
    }
    }
    java.io.File logFile = new java.io.File(“_logs/”+projectName+”.log”);
    java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream(logFile));
    System.setOut(ps);
    System.setErr(ps);

    After executing the job, above code creates a flat file with “projectName.log” and starts writing data which appears on the console. You can create a new file at each execution by post/pre fixing with the time stamp in the file name or use following code. Attached image shows

    java.io.File file = new java.io.File(projectName+”_”+TalendDate.getDate(“CCYYMMDDhhmmss”)+”.log”);

    projectName is the variable name provided by the Talend and you can get the postfix date stamp by another variable TalendDate.getDate(“CCYY-MM-DD hh:mm:ss”). Remove all the special characters in the time stamp. ProjectName can also be replaced by another global variable jobName.

    After successfully executing this job, you can see ProjectName_TimeStamp.log  file is created in the root folder of Talend. This file contains complete console stack trace.

    Drawback



     Drawback of implementing this strategy is that, it will not print or display anything on the console while using IDE or independent execution. This becomes difficult when developer is developing or debugging the job. Because, it is an extra effort for a developer to open a file every time to find out whether the job is executed successfully and generated error or not.

    logo

    Best Open Source Business Intelligence Software Helical Insight is Here

    logo

    A Business Intelligence Framework


    custom logging Dumping the console output to a file from within a job talend Error logging How to redirect all output of my console to a file ? print content with log4j talend Printing out Context and Dumping the Output in Talend Studio Redirect the output from the console to a file Redirecting Talend Console Logs to File Talend Logs tLogRow and the error log in Talend ESB Runtime Write console logs to log files in Talend Stutio
    0 0 votes
    Article Rating
    Subscribe
    Connect with
    Login
    I allow to create an account
    When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
    DisagreeAgree
    Notify of


    I allow to create an account
    When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
    DisagreeAgree
    0 Comments
    Inline Feedbacks
    View all comments

    You might also like..

    Helical Insight

    Helical IT Solutions Launches Helical Insight 5.2.2 : Focus on Advance Embedded Analytics

    By admin

    24 Dec 2024: Helical IT Solutions is excited to unveil Helical Insight 5.2.2, the latest iteration of its cutting-edge Open Source Business Intelligence (BI) platform. This release reinforces Helical Insight's position as a cost-effective, versatile, and powerful alternative to mainstream...
    • December 26, 2024
    • 0
    Helical Insight 5.2.1

    Helical IT Solutions Launches Helical Insight 5.2.1: Elevating Open Source BI to New Heights

    By admin

    02 Sept 2024 – Helical IT Solutions is thrilled to announce the release of Helical Insight version 5.2.1, the latest upgrade to its Open Source Business Intelligence (BI) platform. This new version delivers a powerful, cost-effective BI solution that is...
    • September 2, 2024
    • 0
    Business Intelligence

    Installation of Firebird db

    By admin

    Steps to install firebird db 1. Go to google and type firebird in search box and then click on first link. License aggrement 2. Click on downloads and then install Firebird latest version(5.0.0). 3. It will navigate to the below...
    • April 30, 2024
    • 0

    Contact Form

      Let’s get started to unravel your best-fit solution.

      ABOUT HELICAL IT SOLUTIONS PVT LTD

      Helical IT Solutions Pvt Ltd specializes in Data Warehousing, Business Intelligence and Big Data Analytics. We offer consultation in selection of correct hardware and software as per requirement, implementation of data warehouse modeling, big data, data processing using Apache Spark or ETL tools and building data analysis in the form of reports and dashboards with supporting features such as data security, alerts and notification, etc.

      Learn More

      Blog

      Helical Blog

        

      Recent Posts

      • Helical IT Solutions Launches Helical Insight 5.2.2 : Focus on Advance Embedded Analytics December 26, 2024
      • Helical IT Solutions Launches Helical Insight 5.2.1: Elevating Open Source BI to New Heights September 2, 2024
      • Installation of Firebird db April 30, 2024

      © 2025 Helical IT Solutions Pvt Ltd

      0
      0Shares
      wpDiscuz
      Join Us