community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

how to clean fields whitespace or null

Alteryx Partner

I have created a design in Alteryx that unites three hundred and ninety thousand XML files and I need to delete null fields. I attached the XML format and also the design that I'm working on right now.

Alteryx Certified Partner
Alteryx Certified Partner

I'd use the Dynamic Select tool here, but it needs to be housed in a batch macro so it can be updated with values from the workflow. In the attached solution, I transpose the data and identify fields that have an empty max value. This list of fields where all values are empty is concatenated and sent to the Dyanmic DeSelect macro to be deselected.

 

Check out the attached workflow and let me know if that works for you.

Alteryx Partner

it doesn't work because this is my result and i don't want null at the end https://ufile.io/pstl9


@CharlieS wrote:

I'd use the Dynamic Select tool here, but it needs to be housed in a batch macro so it can be updated with values from the workflow. In the attached solution, I transpose the data and identify fields that have an empty max value. This list of fields where all values are empty is concatenated and sent to the Dyanmic DeSelect macro to be deselected.

 

Check out the attached workflow and let me know if that works for you.


 

Alteryx Certified Partner
Alteryx Certified Partner

Ok, I see now. I took care of the first step which removes fields that are null for all records. Now that those are gone, records that are null for each observation could be removed since the json structure is transposed. 

 

The first idea that came to mind would be to edit the text to remove those fields, I've attached a workflow that does that, but it required making the field lengths massive so that data wasn't lost from the 'awb_OuterXML' field. It works, but I haven't thought of a way to reduce the file size back down. Check out the attached workflow to see how I did that text editing and comma correction. 

 

 

Alteryx Partner

it doesn't work i'm new in Alteryx

Alteryx Certified Partner
Alteryx Certified Partner

What about the workflow doesn't work? It uses the eduardo.json file created by the original workflow as an input, so be sure to update that file path to that file.

Alteryx Partner

the first mapping you send it doesn't work and the second too error in clean data... eduardo.json is the result and i want to delete all null value from some fields


@CharlieS wrote:

What about the workflow doesn't work? It uses the eduardo.json file created by the original workflow as an input, so be sure to update that file path to that file.


 

Labels