M$ SQL server DTS package equivalent in Postgres

Поиск
Список
Период
Сортировка
Искать

M$ SQL server DTS package equivalent in Postgres

От:
Paul Lambert <paul.lambert@autoledgers.com.au>
Дата:
G'day,

Is there an equivalent in Postgres to the DTS Packages available in M$ 
SQL server.

I use these in SQL server to pre-load data from CSV files prior to 
enabling replication from my primary application. Any pointers on where 
best to go for this would be appreciated. I'm reading about something 
called EMS, is that the way to go?

Sample of one of the files I use:

DEALER_ID^DATE_CHANGED^TIME_CHANGED^BILLING_CODE_ID^DES^BILLING_CODE_TYPE^LABOUR_RATE^LABOUR_SALES_GROUP^CUSTOMER_NO^PARTS_SALES_GRO
f UP^COMEBACK^WORKSHOP^FRANCHISE^LOCATION^DELETEFLAG
F65^23-Jan-2007^10:13^AA^ADVERSITING ADMIN^I^45^40^2196^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^AN^ADV NEW^I^45^40^1636^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^AP^ADV PARTS^I^45^40^1919^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^AS^ADV SERV^I^45^40^2057^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^AU^ADV USED^I^45^40^1775^18^^0^BLANK^0^N
F65^23-Jan-2007^10:13^BA^B R&M ADM^I^45^40^2823^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^BG^BUILDING MAINTENANCE GM 
HOLDEN^I^45^40^1311^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^BN^B R&M NEW^I^45^40^2268^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^BP^B R&M PART^I^45^40^2541^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^BS^B R&M SERV^I^45^40^2680^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^BU^B R&M USED^I^45^40^2401^18^^0^BLANK^0^
F65^23-Jan-2007^10:13^F^FLEET^C^50^27^0^17^^0^BLANK^0^
F65^23-Jan-2007^10:13^FC^FORD COMEBACK MECHANIC^I^65^21^140^19^Y^0^BLANK^0^

Cheers,
Paul.

-- 
Paul Lambert
Database Administrator
AutoLedgers


Re: M$ SQL server DTS package equivalent in Postgres

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Tue, Jan 23, 2007 at 10:15:06AM +0900, Paul Lambert wrote:
> G'day,
> 
> Is there an equivalent in Postgres to the DTS Packages available in M$ 
> SQL server.

Nope.

> I use these in SQL server to pre-load data from CSV files prior to 
> enabling replication from my primary application. Any pointers on where 
> best to go for this would be appreciated. I'm reading about something 
> called EMS, is that the way to go?

This you can do using plain COPY commands from psql. You acn script this
as a SQL file. Or you can script using your faviourite scripting
language such as perl or python or whatever. What we don't do is the
advanced transformation features in DTS, but if you're just loading data
it's fully supported.

> Sample of one of the files I use:


Looks like a plaitnext file with ^ as field delimiter. See the help for
COPY on how to load that.

//Magnus

Re: M$ SQL server DTS package equivalent in Postgres

От:
Paul Lambert <paul.lambert@autoledgers.com.au>
Дата:
Magnus Hagander wrote:
> On Tue, Jan 23, 2007 at 10:15:06AM +0900, Paul Lambert wrote:
>> [snip]
> 
> This you can do using plain COPY commands from psql. You acn script this
> as a SQL file. Or you can script using your faviourite scripting
> language such as perl or python or whatever. What we don't do is the
> advanced transformation features in DTS, but if you're just loading data
> it's fully supported.
> 
> 
> 
> Looks like a plaitnext file with ^ as field delimiter. See the help for
> COPY on how to load that.
> 
> //Magnus
> 
> 

Thanks for that, looks exactly like what I wanted.

Appreciate the suggestion.

Regards,
Paul.
FAQ