Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Output to MDB does not trim string fields

Highlighted
6 - Meteoroid

I have multiple String fields passing through a data cleansing tool before output to MDB. However, all the fields are output with whitespace to take up the defined size of each field, even if no whitespace exists before. Output to CSV does not show the same issue, so I know the data was trimmed properly with the data cleansing tool. What's the best way to make sure my output to MDB is also trimmed?

Highlighted
11 - Bolide

Hi @jonathanjong,

 

Use the Select tool and change the fields to the V_String datatype before exporting.

 

Sam

Highlighted
17 - Castor
17 - Castor

Hi @jonathanjong 

 

Since the issue doesn't exist when you output to CSV, it must be caused by the MDB system that you're writing to(MS Access?).  Is there some VBA defined within the database that's padding the fields?

 

Another point: How are you reading the data back out off the .mdb file.  Maybe it's this process that's adding the spaces.

 

Dan

11 - Bolide

Hey @danilang,

 

For an MDB file, it saves the string field as the text content plus whitespace padding to fill in the field. Changing to a variable-length v_string allows the field to be saved in an MDB file without this padding issue.

 

Sam

Highlighted
17 - Castor
17 - Castor

@SamDesk 

 

Good to know!  Is it the JET engine driver that does this? 

 

Dan

Highlighted
11 - Bolide

Hey @danilang,

 

Not sure if it's a JET thing or something that's just inherent of the older MS Access MDB databases.

 

Sam

Highlighted
6 - Meteoroid

Sorry to revive this again, but in terms of efficiency, does V_String provide an edge over String? My data is too small to notice a difference, but just out of curiousity. Thank you.

Labels