Talend - Query from Drill


Configuration: Context

To create the different jobs displayed in this article, you have to create a repository : With VALUES

Query from Drill (with all versions of Data Fabric)

Example: Count the number of lines.

  • Create a new job
  • Add the component "tJDBCConnection" : allows the creation of a JDBC database connection
  • Add the component "tJDBCInput" : reads a DB table and extracts fields based on an SQL query 
  • Add the component "tLogRow" : displays results
  • Create links:
    • "tJDBCConnection" is connected with "tJDBCInput" (through "OnSubjobOk")
    • "tJDBCInput" is connected with "tLogRow" (through "Main")

  • Double click on "tJDBCConnection" and set its properties:

    • Click on the tab "Advanced settings" and untick "Use a auto-commit"

  • Double click on "tJDBCInput" and set its properties :
    • Tick "Use an existing connection"
    • Enter a name of table
    • Enter your request : "SELECT COUNT(*) FROM " + context.Storage_Plugins_And_Name_Table_JDBC

  • Run a job