CSV: Difference between revisions

From Starfish ETL
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=Origin=
=Origin=
We've seen some display issues with the CSV connector.  The Connection String sample is not quite correct.  It should read:
We've seen some display issues with the CSV connector.  The Connection String sample is not quite correct.  It should read:
<source lang="bash">
<source lang="sql">
Data Source="C:\Starfish\Folder";Extended Properties="Text;HDR=Yes;"
Data Source="C:\Starfish\Folder";Extended Properties="Text;HDR=Yes;"
</source>
</source>
Your SqL Selection Statement then selects from the filename:
Your SqL Selection Statement then selects from the filename:
<source lang="bash">
<source lang="sql">
SELECT * FROM districts.csv
SELECT * FROM districts.csv
</source>
</source>

Revision as of 15:40, 19 February 2016

Origin

We've seen some display issues with the CSV connector. The Connection String sample is not quite correct. It should read:

Data Source="C:\Starfish\Folder";Extended Properties="Text;HDR=Yes;"

Your SqL Selection Statement then selects from the filename:

SELECT * FROM districts.csv

In addition, thre should be a "Select File..." button just above the Connection String box and all the way to the right. Sometimes, this doesn't display.

Issues

Type mismatch issue where column contains some alpha numeric entries but Starfish believes the data is numeric.

If a column of data contains numeric data for the first few rows and then later contains alphanumeric data Starfish will expect numeric data from every row in the data and will then fail to parse the alphanumeric data. Because by default the Microsoft Jet driver that is used for this functionality only scans the first 16 rows, it tries to make a ‘guess’ based on that data for each column type. This is only a problem is the data changes from numeric to alphanumeric partway through the data as thinks the data is all numbers. In registry, navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Text Find the MaxScanRows key, and change the value to ‘0’. Restart Starfish. It may also be necessary to perform an IISRESET.