You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by "dsanderbi (via GitHub)" <gi...@apache.org> on 2025/11/16 15:16:39 UTC

[D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

GitHub user dsanderbi created a discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

I'm using the Metadata Injection transform calling a pipeline that only has a "select values" and "write to log" transform, see blow:
<img width="436" height="145" alt="{834913E5-AFCC-48AD-993D-7647FFE62D08}" src="https://github.com/user-attachments/assets/ae54f731-cca0-467e-8478-145b32ac9e57" />
This pipeline should extract time/data components of timestamp fields.
I call the Metadata Injection transform and pass all to a dummy. The output can be seen in the preview.
<img width="1309" height="603" alt="{A689DAFA-6186-42CB-A512-C97F14665C68}" src="https://github.com/user-attachments/assets/71ac1fe0-3030-41c7-a265-a48a8ec3135c" />

Now my idea was to use a select values transfrom (or any other transform) where i can use "Get fields to select".
If i use the a "select values" transfrom right after the dummy step or metadata injection im not able to use  the "Get fields to select" anymore!
<img width="618" height="258" alt="{AEBCAA32-BD2E-438C-8EEC-3A2BEF233134}" src="https://github.com/user-attachments/assets/e4c84fae-0267-4c14-83a2-86f5cc5a74e9" />

**So my question is:**
Is this the expected behavior, or should it be possible to further process the data after the Metadata Injection transform?

The examples i have seen only show the Metadata Injection transfrom like this
<img width="364" height="311" alt="{60E2A620-6F4C-4F81-9794-9CFACB25D979}" src="https://github.com/user-attachments/assets/9b629a9a-2ee2-463f-a91d-6590b0bf4262" />



GitHub link: https://github.com/apache/hop/discussions/6023

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

Posted by "dsanderbi (via GitHub)" <gi...@apache.org>.
GitHub user dsanderbi added a comment to the discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

Hi, thank you for the tips, but this is not a solution for me since I don't know what the output/schema will look like (different names).
I wanted to use the metadata injection transform to extract time/date components from any input stream, because I don't know how many timestamp fields will be passed.

We've already implemented it using the User Defined Java Class to create dynamic fields.
I just wanted to check whether it’s possible with metadata injection.
But thanks a lot for your input!

GitHub link: https://github.com/apache/hop/discussions/6023#discussioncomment-15000070

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

Posted by "dave-csc (via GitHub)" <gi...@apache.org>.
GitHub user dave-csc added a comment to the discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

Hi @dsanderbi,

you still need to enter the info of the generated schema, probably what's missing is a button in Metadata Injection that can grab it from the "injected" transform.

A simple workaround: look at the schema in the injected transform using Show output fields and copy all the rows in the table. Then paste them in Metadata Injection's schema: you should get the info with the littlest work...

Hope this helps :)

GitHub link: https://github.com/apache/hop/discussions/6023#discussioncomment-14988746

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

Posted by "dsanderbi (via GitHub)" <gi...@apache.org>.
GitHub user dsanderbi edited a discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

I'm using the Metadata Injection transform calling a pipeline that only has a "select values" and "write to log" transform, see blow:
<img width="436" height="145" alt="{834913E5-AFCC-48AD-993D-7647FFE62D08}" src="https://github.com/user-attachments/assets/ae54f731-cca0-467e-8478-145b32ac9e57" />
This pipeline should extract time/data components of timestamp fields.
I call the Metadata Injection transform and pass all to a dummy. The output can be seen in the preview.
<img width="1309" height="603" alt="{A689DAFA-6186-42CB-A512-C97F14665C68}" src="https://github.com/user-attachments/assets/71ac1fe0-3030-41c7-a265-a48a8ec3135c" />

Now my idea was to use a select values transfrom (or any other transform) where i can use "Get fields to select".
If i use the a "select values" transfrom right after the dummy step or metadata injection im not able to use  the "Get fields to select" anymore!
<img width="618" height="258" alt="{AEBCAA32-BD2E-438C-8EEC-3A2BEF233134}" src="https://github.com/user-attachments/assets/e4c84fae-0267-4c14-83a2-86f5cc5a74e9" />

**So my question is:**
Is this the expected behavior, or should it be possible to further process the data after the Metadata Injection transform?

The examples i have seen only show the Metadata Injection transfrom like this
<img width="364" height="311" alt="{60E2A620-6F4C-4F81-9794-9CFA
CB25D979}" src="https://github.com/user-attachments/assets/9b629a9a-2ee2-463f-a91d-6590b0bf4262" />


[example-stg2.zip](https://github.com/user-attachments/files/23568954/example-stg2.zip)



GitHub link: https://github.com/apache/hop/discussions/6023

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

Posted by "dsanderbi (via GitHub)" <gi...@apache.org>.
GitHub user dsanderbi added a comment to the discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

Yes i saw that option and use it, see
<img width="246" height="134" alt="{0952BF7D-63E4-4419-A041-79F33E5979CA}" src="https://github.com/user-attachments/assets/87005b69-8892-4f1a-b38f-1a413ebe156b" />

**So it's a Bug**, since the  "Get fields to select" button doesn't work after a Metadata Injection transform.

GitHub link: https://github.com/apache/hop/discussions/6023#discussioncomment-14988572

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop? (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: Should it be possible to process stream fields after a Metadata Injection transform in Apache Hop?

Yes, in the options tab of the MDI transform there is a "transform to read from" option and you have to specifiy the return schema.
This way data from that transform will be returned and can be used for further processing.

GitHub link: https://github.com/apache/hop/discussions/6023#discussioncomment-14986353

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org