CSV as data source - basic guide

mceclip0.png

 

What is it?

CSV is a format that shows tabular data with a defined delimiter between each column of data.

 

How to connect through Data Discovery?

With Data Discovery you can connect to a local CSV file...
mceclip1.png

or use a URL to identify the CSV file you wish to connect with...

Here's an example:
On this UN page (https://population.un.org/wpp/Download/Standard/CSV/) you can download different datasets to a CSV format.

You could download this dataset to CSV format as an example:
mceclip2.png

 

But if you right-click and choose to copy the link...
mceclip3.png

 

...you can paste the URL into Data Discovery and create a dynamic data source like this:
mceclip4.png


Note: This could require credentials, which is why the option to add credentials to the query appears when you change type from Local File to URL.

 

Advanced Settings

In the Connection tab of Advanced Settings you can:

mceclip6.png

 

Define the delimiter (often comma, but could also be e.g. semicolon)

Load as string (normally Data Discovery will try to detect the data type - but this setting forces Data Discovery to load all columns as data type string)

Detection row count (number of rows Data Discovery uses to detect data types - can be increased if needed)

Skip X Lines (normally set to 0, but if you need to read past the first lines in the CSV file, you can set this value)

Culture (decides which decimal point is expected - en-US will expect full stop as the decimal point)

Encoding (is about how special characters like letters only existing in a certain region are converted)

Custom Connection string (allows you to write your own connection string)

 

In the Query tab of the Advanced Settings you can:

mceclip7.png

Write you own Custom query if you don't want all the columns from the CSV file.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.