Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Output to MDB does not trim string fields

jonathanjong
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?

6 REPLIES 6
SamDesk
11 - Bolide

Hi @jonathanjong,

 

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

 

Sam 🙂

danilang
19 - Altair
19 - Altair

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

SamDesk
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 🙂

danilang
19 - Altair
19 - Altair

@SamDesk 

 

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

 

Dan

SamDesk
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 🙂

jonathanjong
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