pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Igal @ Lucee.org <igal@lucee.org>
To: Merlin Moncure <mmoncure@gmail.com>
To: Adam Brusselback <adambrusselback@gmail.com>
Cc: Allan Kamau <kamauallan@gmail.com>
Cc: Postgres General Postgres General <pgsql-general@postgresql.org>
Subject: Re: Migrating money column from MS SQL Server to Postgres
Date: Thu, 9 Nov 2017 15:41:58 -0800
Message-ID: <76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org> (raw)
In-Reply-To: <CAHyXU0xt4c_N7jAkcGm+OBVYrDazxVStBQs_8kOudH=r-w=Rjw@mail.gmail.com>
References: <8acca674-ac7c-2b48-9a3e-8b8acf8b2c36@lucee.org>
	<4497.1510188301@sss.pgh.pa.us>
	<CAF3N6oS3REmTvwimqhRm0oikyncTUoiQ23sHKYrXJENxcW7JvA@mail.gmail.com>
	<4b6a0bfb-0cbc-b407-feaa-0be86f06e4d9@lucee.org>
	<CAF3N6oQow_Bj8P6Y1f+rw00yTrK6ncvmqF2xCSvWwNJ6+ua7uA@mail.gmail.com>
	<fdf92d62-c165-e6f3-9a22-dbb562b5afd4@lucee.org>
	<724bab58-87d9-7b02-867b-5d98b93aac7d@lucee.org>
	<CAF3N6oTc2PpHZ1XcJp7=8iGgfdVGtR+9vECevSxxTH3j3YfbDA@mail.gmail.com>
	<CAMjNa7czAXdToGnHqJRtDjCOFsFevxOCzA=Ypv0yAF7nh7iYfA@mail.gmail.com>
	<CAHyXU0xt4c_N7jAkcGm+OBVYrDazxVStBQs_8kOudH=r-w=Rjw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 11/9/2017 8:19 AM, Merlin Moncure wrote:
> On Thu, Nov 9, 2017 at 8:22 AM, Adam Brusselback
> <adambrusselback@gmail.com> wrote:
>>> Since you are migrating data into a staging table in PostgreSQL, you may set
>>> the field data type as TEXT for each field where you have noticed or
>>> anticipate issues.
>>> Then after population perform the datatype transformation query on the given
>>> fields to determine the actual field value that could not be gracefully
>>> transformed.
>> This is the approach I have come to as the most successful for data migrations.
>>
>> I will use tools like Kettle / Talend to get data into a staging table
>> with every column as text, then use SQL to migrate that to a properly
>> typed table.  Works much better than trying to work within the
>> constraints of these tools.
> YES
>
> I call the approach 'ELT', (Extract, Load, Trasform).  You are much
> better off writing transformations in SQL than inside of an ETL tool.
> This is a perfect example of why.

All sound advice.  Thanks.


Igal Sapir

Lucee Core Developer
Lucee.org <http://lucee.org/;

view thread (12+ messages)

Message-ID: <76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org>
Permalink:  ../76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org/
Also on:    postgresql.org/message-id/76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: igal@lucee.org, mmoncure@gmail.com, adambrusselback@gmail.com, kamauallan@gmail.com
  Subject: Re: Migrating money column from MS SQL Server to Postgres
  In-Reply-To: <76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org>
  References: <8acca674-ac7c-2b48-9a3e-8b8acf8b2c36@lucee.org> <4497.1510188301@sss.pgh.pa.us> <CAF3N6oS3REmTvwimqhRm0oikyncTUoiQ23sHKYrXJENxcW7JvA@mail.gmail.com> <4b6a0bfb-0cbc-b407-feaa-0be86f06e4d9@lucee.org> <CAF3N6oQow_Bj8P6Y1f+rw00yTrK6ncvmqF2xCSvWwNJ6+ua7uA@mail.gmail.com> <fdf92d62-c165-e6f3-9a22-dbb562b5afd4@lucee.org> <724bab58-87d9-7b02-867b-5d98b93aac7d@lucee.org> <CAF3N6oTc2PpHZ1XcJp7=8iGgfdVGtR+9vECevSxxTH3j3YfbDA@mail.gmail.com> <CAMjNa7czAXdToGnHqJRtDjCOFsFevxOCzA=Ypv0yAF7nh7iYfA@mail.gmail.com> <CAHyXU0xt4c_N7jAkcGm+OBVYrDazxVStBQs_8kOudH=r-w=Rjw@mail.gmail.com> <76a6857b-e488-7509-81fd-c6543fe949ee@lucee.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox