SQL Server Import/Export Saving Custom Column sizes and indented column list

Hi

I am having some trouble with some thing on Import Export. I am currently trying to load a file with lots of columns and a good few of those require custom sized columns. This takes ages to do as I have to do a max(len(a1:a3000)) in Excel as some of the text in the columns is really large.

Thing is if I decide to come out of the import export for any reason I have to put in all of those column sizes again, is there a way to save these settings or replicate them if I close and rerun the import export tool again? I do save the package but you can't edit anything from there. I was thinking I could copy the sql but that only works from the mapping section onwards.

I've noticed that the size that the tool thinks is right or estimated is usually either too large or too small for the column. I don't know how it determines these however imagine it "samples" a subset of the data and determines column size that way.

My next problem is one file I am loading; the columns list in the preview is indented. Some of the columns are flat against the left of the window, and the next one or two are indented. There doesn't seem to be a pattern to this but it;'s about 3 or 4 columns at a time then it returns to normal. so it's like this:

Column1
Column2
 Column3
  Column4
Column5
Column6
 Column7
  Column8
    Column9
etc......

Really odd, never seen this in import export, anyone know why it is doing this? It is an excel CSV file. I have load ed these types of files before with no problem.

Thanks

G

Once you save the package - you would then open it in SSDT instead of the Import/Export wizard. In fact, you should be utilizing SSDT instead of the wizard for building these...

You have much better control over the file connection attributes - allowing you to define the column types and lengths as you need instead of relying on the wizard to define them for you.

Thanks I 'd had some problems trying to install the data tools, it keeps asking to install data tools for 2017, which I do not understand why it is asking this as I already have 2012 version, and do not want to update in case it breaks anything. I would prefer to find out though why it is indenting the columns in import export, never seen that before.