Skip to main content

I have a HttpCaller that reads different kinds of information depending on the user input and therefore the attribute column names are all the time different. With the JSONFlattener you can import the column names that you want to expose, but ideally I would like to expose them dynamically. I was wondering if something like that is possible.

afbeelding

No, this is not possible. Several options depending on what you need, but if you want to write a file depending on the input, you can use the SchemaScanner to create a schema feature based on the attributes in your data features. The schema feature can be used in a (Feature)Writer to do dynamic writing, where the attributes are created based on the Schema Feature.


No, this is not possible. Several options depending on what you need, but if you want to write a file depending on the input, you can use the SchemaScanner to create a schema feature based on the attributes in your data features. The schema feature can be used in a (Feature)Writer to do dynamic writing, where the attributes are created based on the Schema Feature.

@nielsgerrits​  Oh I forgot to mention, but after the Flattener I am using a Schemamapper, since the names are not meaningful (such as Naam_17, Code_18), so I am using a schemamapper after the flattener. In my case, would it still be possible to use the SchemaScanner and use dynamic writing in the writer? Ideally I expose the names beforehand and use the Schemamapper to change the names to something more meaningful, then afterwards I write it to an excel for example.


@nielsgerrits​  Oh I forgot to mention, but after the Flattener I am using a Schemamapper, since the names are not meaningful (such as Naam_17, Code_18), so I am using a schemamapper after the flattener. In my case, would it still be possible to use the SchemaScanner and use dynamic writing in the writer? Ideally I expose the names beforehand and use the Schemamapper to change the names to something more meaningful, then afterwards I write it to an excel for example.

To be sure, how do you use this process? Must it be full auto or do you want to prevent manually enter the to be exposed attributes? Because, if you have featurecaching on, you can use the AttributeExposer to import all possible values from feature cache.


@nielsgerrits​  Oh I forgot to mention, but after the Flattener I am using a Schemamapper, since the names are not meaningful (such as Naam_17, Code_18), so I am using a schemamapper after the flattener. In my case, would it still be possible to use the SchemaScanner and use dynamic writing in the writer? Ideally I expose the names beforehand and use the Schemamapper to change the names to something more meaningful, then afterwards I write it to an excel for example.

My end goal would be to make a workspace app and the user fills a value (user hasto provide a link from CBS that contains the table that they are interested in) that is used to create the Request URL in the HttpCaller, data is read from that link and at the end of the script written to an excel as output. In between a schemamapper is used, since the names are not meaningful. I use another excel in the schemamapper that is already created in the same script that have the old and the new names of the columns

 

I would like to make it as automatic as possible so the user only needs to fill in that value. In the attributeexposer you need to manually delete the old column names and import from feature cache to get the new column names. This is not automatic unfortunately. I can provide the script, since public data is called in the script if that would make the process in the script more understandable for you.


@nielsgerrits​  Oh I forgot to mention, but after the Flattener I am using a Schemamapper, since the names are not meaningful (such as Naam_17, Code_18), so I am using a schemamapper after the flattener. In my case, would it still be possible to use the SchemaScanner and use dynamic writing in the writer? Ideally I expose the names beforehand and use the Schemamapper to change the names to something more meaningful, then afterwards I write it to an excel for example.

I think you only have to prepare for all possible names in the AttributeExposer and let the SchemaScanner drop em if they have no data.


Reply