Skip to main content
Solved

Question on checking a dataset attributes name

  • April 29, 2022
  • 6 replies
  • 60 views

Forum|alt.badge.img

Hello there,

I would like to check a dataset attributes. So I would like to write a workspace that can check the incoming dataset.

For example, I expect to receive a dataset that has attribute name.

 

My expectation dataset attribute name: A, B & C

The incoming dataset attribute name: B, C & D.

 

In this case, I would like to call out attribute A and D. As attribute A is what I expected but missing and D is not the attribute name that I want.

 

May I ask what transformer I should use in this case?

 

Thank you very much.

 

Zachary

Best answer by nielsgerrits

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary

I think you want to do something like this:

2022-05-02_07h15_23

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • April 29, 2022

I think you have multiple options:

  • Schema Feature. Use the FeatureReader to read only the Schema Feature. Attributes to Features using the ListExploder.
  • AttributeExploder. Use the FeatureReader to read one feature. Attributes to Features using the AttributeExploder. (This will be performance intensive when processing a lot of features with a lot of attributes so probably less optimal.)

Compare features against a lookup table with the attributes you expect and act as you need.


Forum|alt.badge.img

I think you have multiple options:

  • Schema Feature. Use the FeatureReader to read only the Schema Feature. Attributes to Features using the ListExploder.
  • AttributeExploder. Use the FeatureReader to read one feature. Attributes to Features using the AttributeExploder. (This will be performance intensive when processing a lot of features with a lot of attributes so probably less optimal.)

Compare features against a lookup table with the attributes you expect and act as you need.

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • May 2, 2022

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary

I think you want to do something like this:

2022-05-02_07h15_23


Forum|alt.badge.img

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary

Thank you so much for your help! However, I do have a few questions would like to clarify.

1) the purpose of the 1st FeatureReader and AttributeExposer are to scan all the input files in a single folder?

2) the purpose of the 2nd FeatureReader is to read all the input files and explode all the attributes' name by using ListExploder?

 

Thank you and sorry for the troubles.

 

Zachary


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • May 4, 2022

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary

1) the purpose of the 1st FeatureReader and AttributeExposer are to scan all the input files in a single folder?

Yes.

2) the purpose of the 2nd FeatureReader is to read all the input files and explode all the attributes' name by using ListExploder?

This reads only the schema of the file found by the first FeatureReader. The Schema feature contains a list with all column names. The ListExploder converts the listelements to features.


Forum|alt.badge.img

Thank you for your help. However, I still not sure if I know how to set up the workspace. I have tried and it couldn't work. Could you please explain a little bit more?

 

Sorry for the trouble and thank you for your help.

 

Have a good weekend!

 

Zachary

Got it. Thank you so much for your help. I am really appreciate that! :)

 

Zachary