Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3322600
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:12:05+00:00 2026-05-17T23:12:05+00:00

I have a database table, let’s call it headers with an id and a

  • 0

I have a database table, let’s call it headers with an id and a String-field called “header”. Another table in the database, called subheaders has two fields, headerId and the String field “subheader”. There are 0, 1 or 2 subheaders per header. I now want to use Kettle/Pentaho Data Integration to generate an Excel output with the following columns:

header subheader1 subheader2

I tried the following: Table Input on “headers”, table input on “subheaders” for subheader1, table input on “subheaders” for subheader2. A “database lookup” is not possible as that doesn’t allow me to exclude the subheader1 in the query for subheader2.

My main problem is that I cannot reference the stream fields in the SQL statement directly but instead have to rely on the order of the fields. The first question mark gets filled with the first stream field, and so on.

The queries:
For the “headers” table:

SELECT id, header FROM headers

For the “subheaders” table (2 table input steps in a row):

SELECT subheader AS subheader1, ? AS header FROM subheaders WHERE headerId = ?
SELECT ? AS subheader1, subheader AS subheader2, ? AS header WHERE headerId = ? <- doesn't work as I don't have a reference to the header-ID anymore

Any idea, how to solve this problem nicely?

Thanks for any ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:12:05+00:00Added an answer on May 17, 2026 at 11:12 pm

    I solved this problem by using a JOIN construct in a Table Input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table, let's call it Countries. Countries all have names, short
Okay, so let's say I have a mysql database table with two columns, one
Let's say I have two tables: Report Comment And assuming I have a database
I have a database table named call with columns call_time, location, emergency_type and there
I have a database table called Posts which stores all the information regarding an
This may be a newbie question, But let's say I have a database table
I have a database table that has a SortOrder integer column. In the UI
I'm using entity framework to connect the database. I've a table(Let's call it File)
Let's say I have the following simple table variable: declare @databases table ( DatabaseID
Let's say I have DatabaseA with TableA, which has these fields: Id, Name. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.