Migrate excel data to postgres database - talend

I'm trying to migrate data from an excel file to postgres but this problem is blocking it.

Related

Is there any way of of get backup of postgres db in docker container without generating sql file?

I am new in Docker, I want to get a backup for my postgress database running in docker. All solutions i saw are offering to generate a dump sql script and restore db with running this script. But i dont want to do this? Is it possible backup and restore by migrating binary files of the db?
You can build Postgres image from plain empty Postgres db image. In Dockerfile you add SQL script which runs on db initialization (docker-entrypoint-initdb.d). The SQL script contains dblink to your backed up db and commands create table my_table as select * from my_table#remotedb. After docker build you have image with backup of your original database tables.
I do something similar with Oracle with more complexity (copying only subset of original database, preserving indexes etc.). Oracle docker image differs from PG in some properties but I believe the rough idea is applicable. It is some time ago I worked with PG so I won't advise you how to migrate binary files (though I believe it would be possible too).

Can we load CSV data from S3 to Redshift and RDS using same COPY command?

I'm working on a class that processes CSV files into Redshift and also Postgres DB.
For copying data into Redshift, I've created a function - process_files that takes a processingID, searches the files that contain pattern like redshift{processingID}-*.csv in the local directory and upload and copy the CSV files from S3 to Redshift using COPY command as mentioned in https://docs.aws.amazon.com/redshift/latest/dg/t_loading-tables-from-s3.html.
like
copy customer
from 's3://mybucket/mydata'
access_key_id '<access-key-id>'
secret_access_key '<secret-access-key';
I'm using Psycopg2 to connect to Redshift.
But I also need to load the data that is present in S3 to another Postgres DB not the Redshift.
The only difference is the pattern for the new Postgres DB, the pattern of files will be like
prediction{processingID}-*.csv. Here also I'm using Psycopg2 to connect to new Postgres DB.
Can I use the same COPY command that I used for copying from S3 to Redshift for copying from S3 to the new Postgres DB?
Can I execute the same COPY command on the new Postgres DB connection and just change the file and table names for loading data? Will it work?

How to migrate a db2 database

I have a db2 database on a device which does not have internect connectivity and would like to move this database to another place. I have taken a backup from my database, can I use the 'restore' command to create a clone of this database?
To move a Db2 database from on-premise to Db2 Warehouse on Cloud, one option is to use IBM Lift CLI. https://www.lift-cli.cloud.ibm.com/
You will need to have internet connectivity from the place your data resides on-premise - either a Db2 database, or failing that CSV files.
If all you have is a Db2 backup image, you would need to restore that into a local database, or use the (chargeable) utility High Performance Unload to extract table data as CSV files from the backup image. IBM Lift CLI does not support Db2 backup images as a source for migration to the cloud.
Note that if you use CSV files, you will need to extract the DDL from the source database and create the empty tables on the target.

How to load or import backup file into new teradata database?

I'm working in Teradata Database Express 14.04
I took the particular database build( backup the database) in Teradata Database.
The Archived file is stored in /roor/Documents/TD_BUILD. The file extension of TD_BUILD is (.File).
Now, how to import that file into new Database in Teradata?
To restore to a different system and/or database or to restore a dropped table you need a COPY instead of a RESTORE:
copy data tables(xyz),release lock,file=test;
Caution, restoring on database level drops all objects within first, i.e. ARCMAIN submits a DELETE DATABASE.
If you restore to a different database:
copy data tables(newdb) (from (xyz)),release lock,file=test;

How to create a graphical schema for Postgres database?

I have got a sql file where is configured a database in PostgreSQL technology. I created a database from sql file but from code it is hard to understand action/connecting between the tables. Is it some tool which show all the connections between tables for PostgreSQL?
pgDesigner
Data Architect
Datastudio
DbDesigner fork
DbSchema
dbwrench
DeZign for Database
Please take a look to this list of tools.