1. 程式人生 > >Use Data Pipeline to Copy Tables to Another Database

Use Data Pipeline to Copy Tables to Another Database

Download and use these scripts to copy a table from one database to another using Data Pipeline. Before you begin, modify the sample definition file with your database, EC2 instance details, and the path to your hosted shell script in Amazon Simple Storage Service (Amazon S3).

Copy an Amazon RDS for PostgreSQL table to an Amazon Redshift table using Data Pipeline

PostgresqlRdsToRedshift is a sample pipeline definition file that shows all activities and pipeline objects for copying an Amazon RDS for PostgreSQL table to an Amazon Redshift table. This sample file is based on the default Data Pipeline template used to copy a MySQL table to an Amazon Redshift table, with changes to the shell script used in the ShellCommandActivity

. The sequence of activities in the pipeline is as follows:

1.    RDSToS3CopyActivity - CopyActivity copies from an RDS table to the Amazon S3 staging path. CopyActivity stages the entire RDS table to the EC2 instance running the activity. Allocate a larger EBS volume to your EC2 instance if you require additional space to fit your entire RDS table.

2.    RedshiftTableCreateActivity - ShellCommandActivity creates the target Amazon Redshift table. This activity runs the dbconv_psqlRDStoRedshift.sh script which is hosted in your S3 bucket.

3.    S3ToRedshiftCopyActivity - RedshiftCopyActivity uses the Amazon Redshift COPY command to copy the Amazon S3 CSV file to the target Amazon Redshift table.

4.    S3StagingCleanupActivity - ShellCommandActivity cleans up the intermediate Amazon S3 CSV file.

Copy an Amazon RDS for MySQL table to an Amazon RDS for PostgreSQL table using Data Pipeline

mysqlRDS-psqlRDS-copy-using-shell-definition.json is a sample pipeline definition file that shows all activities and pipeline objects for copying an Amazon RDS for MySQL table to an Amazon RDS for PostgreSQL table. This sample file is based on the default Data Pipeline Template used to copy a MySQL table to an Amazon Redshift table, with changes to the shell script used in the ShellCommandActivity. The sequence of activities in the pipeline is as follows:

1.    RDSToS3CopyActivity - CopyActivity copies from the RDS table to the Amazon S3 staging path. CopyActivity stages the entire RDS table to the EC2 instance running the activity. Allocate a larger EBS volume to your EC2 instance if you require additional space to fit your entire RDS table.

2.    SyncS3CsvToEc2 - ShellCommandActivity syncs the Amazon S3 CSV file to the local directory of the EC2 instance. PostgreSQL RDS does not support copying from Amazon S3.

3.    JdbcTableCreateActivity - ShellCommandActivity creates the target table in Amazon RDS for PostgreSQL table and writes the table data that is synced on the local EC2 instance to the target PostgreSQL table. This activity runs the dbconv_mysqlRDS-to-postgresqlRDS.sh script which is hosted in your S3 bucket.

4.    S3StagingCleanupActivity - ShellCommandActivity cleans up the intermediate Amazon S3 CSV file.

相關推薦

Use Data Pipeline to Copy Tables to Another Database

Download and use these scripts to copy a table from one database to another using Data Pipeline. Before you begin, modify the sample definition

Use data define file and colmap to map different column

通常我們使用OGG同步一個表的時候,遇見兩個表的列不一樣,這時候我們就需要使用資料定義檔案和colmap將行進行對映 下面我們來看看源表的結構: SQL> desc test3; Name

torch報錯TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor

錯誤程式碼:a.numpy()(企圖使用tensor.numpy()函式將torch.Tensor型別轉換成numpy型別) 報錯:TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tens

Use decision tables to write better tests faster

Two kings, one pawnOne of my friends is a Chess Grandmaster. He wrote a program for a Computer Science project which determined if a Chess position contain

How We Use Data to Suggest Tags for Your Story

How We Use Data to Suggest Tags for Your StoryHere on Medium, we envision tags to be central in organizing and connecting ideas. Follow the tags you’re int

Resolve AWS Data Pipeline error "Resource is stalled. Associated tasks not able to make progress."

Here are some common reasons why Amazon EC2 instances time out in Data Pipeline. Software updates after launch If you don

Use data science to up your game performance

Spencer Krum shows you how he uses Jupyter Notebooks and IBM Data Science Experience (DSX) to analyze professional StarCraft II matches (which represent t

Using a TaskDecorator to copy MDC data to @Async threads

在Spring中使用執行緒池執行非同步任務,通過TaskDecorator進行父執行緒向子執行緒傳遞引數 (同一個執行緒的實現方案

Maven install [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources

all div pro 警告 enc resource encoding sin 配置 一、背景   maven項目install過程中,出現:[WARNING] Using platform encoding (UTF-8 actually) to copy filter

MAVEN Error: Using platform encoding (GBK actually) to copy filtered resources.....

XML tracking pom.xml文件 pos bsp cli -a ati Coding 環境:Maven3.2.5+MyEclipse 2015CI 現象:在Maven編譯過程中出現錯誤信息:Using platform encoding (GBK act

How to convert BigDecimal to Double in spring-data-mongodb framework

public 行存儲 沒有 err 自己 dbr tom odbc sim 問題描述:我們都知道對於涉及錢的數據必須使用BigDecimal類型進行存儲,今天在查詢mongo時仍然有精度問題,雖然我在代碼中使用了Big Decimal類型,但mongo中使用的是double

linux copy file to window

body 分享圖片 iar wid psc 輸入 .exe img 本機 1.下載Putty 工具 地址:https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html 2.解壓 之後 安裝,安裝之後的目錄:

maven工程中警告[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

文件 prop 源文件 使用 end 默認 .so utf-8 source [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platfor

關於ADB push 出現failed to copy 'D:\file.xtxt' to '/system/temp/' : Read-only file system 的報錯資訊解決辦法

首先使用USB連線電腦與小機,然後安裝adb相應的驅動,這是第一步,也是必須要做的。 進入doc系統後,敲入adb shell  可以進入linux命令列狀態,說明adb可以使用了。 回到標題,我們現在要講的是adb push命令的使用。如果你的linux也安裝有adb命令的話,可以使用adb

MySQL 5.7.20安裝完成初始化報錯[ERROR] failed to set datadir to C:\Program Files\MySQL\MySQL Server 5.7\data\

1.net start mysql 提示服務名無效,百度查到需要初始化MySQL: mysqld -initialize ,結果報錯: 更換命令: mysqld --initialize --user=mysql --console  ,mysqld -instal

Data Wrangling文摘:How to share data with a statistician

原文地址:GitHub - jtleek/datasharing: The Leek group guide to data sharing  https://github.com/jtleek/datasharing This is a guide for anyone who needs to

ORA-39194: Table mode jobs require the tables to be comma separated.

一、問題概述 expdp通過parfile導數時候報錯如下: ORA-39194: Table mode jobs require the tables to be comma separated. 相關指令碼為: userid='sys/[email protecte

table configuration with catalog null schema root and table message did not resolve to any tables

最近在使用mybatis generator 工具自動生成一個dao層對映時,報如下錯誤,不知如果debug,求指導~ 具體配置檔案如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ge

notification使用不當導致的宕機重啟問題分析(Could not copy bitmap to parcel blob. )

前言 前段時間遇到了一個宕機重啟問題,比較複雜,涉及到多方面的知識,我也分析了很長的時間,期間學到了很多東西,現在把分析的過程整理一下,希望可以給大家一點幫助和啟發,同時也幫助自己再鞏固一下。 一、問題的復現 首先說一下問題最開始的分析思路以及復現的過程,log 中最核心的部

Why You Shouldn’t Use Facebook to Log In to Other Sites

This story is for Medium members.Continue with FacebookContinue with GoogleMedium curates expert stories from leading publishers exclusively for members (w