All Products
Search
Document Center

Create a PostgreSQL table

Last Updated: Apr 23, 2019

Unlike creating MySQL tables, to create SQL Server or PostgreSQL tables you need to specify the schema name and table name in table_mapping of the SQL Server or PostgreSQL database.

  1. create external table person (
  2. id int,
  3. name varchar(1023),
  4. age int
  5. ) tblproperties(
  6. table_mapping = 'public.person'
  7. );

After specifying the schema name and table name, you can connect to DLA through a PostgreSQL client, and read data in the PostgreSQL database, or cleanse data in the OSS or Table Store instance and write the data to the PostgreSQL database. For more information about the operation, see Cleanse data in OSS and write data to ApsaraDB for RDS in Create a MySQL table and read and write data from and to the table.