Baycastle SoftwareHome Page
  Contact Forum Support Home

Import data as a String

Returning to the question of if to import data as text.

The support team was asked just last week if to import data into DataSlave as text (or string) or in other data formats: Int, Date, DateTime, Decimal, Float, Boolean and others. The response was if in doubt, Data Import as Text.

Here is some of the discussion.

We advise that you generally import data as text because if you try to import, for example, as a datetime there may be mal-formed data that will not import correctly as it will not conform to the data type and will be interpreted as Null. If you import as text you can then work on the data and make corrections using DataSlave’s many string manipulations functions where necessary and then translate or cast to the suitable data type later in the DataSlave Map. If the data is to poor to correct then after validation write out into a file for inspection.

So what is a Null?

A Null is no data at all and should not be confused with an empty string. So a Date can be a valid date or Null. Reading in for example 32 July 2008 will lead to a Null if the data type is Date. However if read in as Text it could be corrected, perhaps to 31 July 2003 and then used as a valid date when imported into your target system. This Data Import approach will retain as much information as possible.

DataSlave will automatically cast data type if you set the output type to for example DateTime. You can also use cast functions. Be under control of the treatment of data as part of your Data Import plan.

Talk to us and we can help you build your plan for data migration, data import or data export.

 



News

What is a Null?

A Null and an empty string are not the same. We discuss when a Null is found in the data and how it is used.

Handling abbreviations in your data

We discuss how to handle abbreviations found in your source data. DataSlave offers a tool to abbreviate and indeed "de-abbreviate" data.

 

 

 

Baycastle Software - specialists in data migration