Austin,

If your data is not coming from something like ExecuteSQL (which Bryan
mentioned) but you are defining a schema for it, there are a couple of
options. First, what format is your data in? If CSV, you can configure
a CSVReader to use your schema and ignore the header, effectively
renaming the fields. That reader can be used in any downstream
record-aware processor (don't bother using ConvertRecord to read and
write to the same format, it is unnecessary).  If your data is in
JSON, you can use the JoltTransformJSON processor to rename the
fields. If your data is in XML, you can use TransformXML to rename the
fields. If it is in some other format, please describe and we can get
it figured out.

Regards,
Matt


On Wed, Nov 8, 2017 at 9:21 AM, Bryan Bende <bbe...@gmail.com> wrote:
> Austin,
>
> Are you referring to Avro schemas created by ExecuteSQL?
>
> If so, there was a property added called "Normalize Table/Column
> Names" which will convert non-compatible characters for you.
>
> -Bryan
>
>
>
> On Wed, Nov 8, 2017 at 9:10 AM, Austin Duncan <adun...@pyaanalytics.com> 
> wrote:
>> So avro schemas dont allow spaces. Is there a way for me to replace
>> underscores with spaces efficiently? Right now I am using a bunch of replace
>> text processors to replace the strings that contain underscores with strings
>> with spaces. Is there a better way of doing this? It works now because my
>> tables are not very big but i imagine there will be a situation in which I
>> will have a table with a lot of columns that I would want to replace.
>>
>> --
>> Austin Duncan
>> Researcher
>>
>> PYA Analytics
>> 2220 Sutherland Avenue
>> Knoxville, TN 37919
>> 423-260-4172

Reply via email to