{"id":52245,"date":"2025-10-03T00:00:00","date_gmt":"2025-10-03T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/migrate-psql-griddb-cloud\/"},"modified":"2025-10-03T00:00:00","modified_gmt":"2025-10-03T07:00:00","slug":"migrate-psql-griddb-cloud","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/","title":{"rendered":"Migrate from PostgreSQL to GridDB Cloud"},"content":{"rendered":"<p>In a previous article, we talked about some new features in the <a href=\"https:\/\/griddb.net\/en\/blog\/griddb-cloud-cli\/\">GridDB Cloud CLI Tool<\/a> which showcased the ability to make tables based on schemas in the form of JSON files. Included in that was also the ability to migrate from GridDB Community Edition (on prem) to the Cloud in just a few commands; you can read that article here: <a href=\"https:\/\/griddb.net\/en\/blog\/new-features-griddb-cloud-cli\/\">New Features of the GridDB Cloud CLI Tool<\/a>.<\/p>\n<p>In this article, we will again feature the GridDB Cloud CLI Tool, but this time we want to showcase the ability to migrate from your on-prem PostgreSQL database directly to your GridDB Cloud instance.<\/p>\n<p>We will get into the details later in the article, but here is a basic rundown of the steps required to make this work:<\/p>\n<ol>\n<li>Export PostgreSQL tables as CSV row data<\/li>\n<li>Export schemas of all PostgreSQL tables as JSON file<\/li>\n<li>Use GridDB Cloud CLI Tool to transform the data, create the corresponding tables, and then load the data into GridDB Cloud<\/li>\n<\/ol>\n<p>Also please note: this tool is intended for developers and is not of production level quality &#8212; it is not made by the official GridDB Development team, so please if you face any issues, leave a comment in this article or within the GridDB Cloud CLI Tool&#8217;s repo and we will look into it.<\/p>\n<h2>Downloading the Tool and Examples<\/h2>\n<p>The source code for this tool and the binaries to get the latest version are found on GitHub: <a href=\"https:\/\/github.com\/Imisrael\/griddb-cloud-cli\">https:\/\/github.com\/Imisrael\/griddb-cloud-cli<\/a>.<\/p>\n<p>The example directories with CSV data that you can test with are found in the <code>migrate-psql<\/code> branch: <a href=\"https:\/\/github.com\/Imisrael\/griddb-cloud-cli\/tree\/migrate-psql\/migration_dirs\">https:\/\/github.com\/Imisrael\/griddb-cloud-cli\/tree\/migrate-psql\/migration_dirs<\/a>.<\/p>\n<h2>Scripts to Export PostgreSQL<\/h2>\n<p>Before we showcase running an example of this process, let&#8217;s first take a look at the scripts needed to export the data from your PostgreSQL instance into a more neutral and workable data format (CSV). We will use two different scripts in this phase, one for extract row data, and the other to grab &#8216;meta&#8217;\/schema data; both of these scripts rely on the <code>psql<\/code> command to directly communicate with the database to grab the data we need.<\/p>\n<h3>Script for Row Data<\/h3>\n<p>Here is the script to extract your row data; it will generate a unique CSV file for each table in your database, with the filename corresponding directly to the name of the table &#8212; handy!<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">#!\/bin\/bash\n\n# Check if a database name was provided.\nif [ -z \"$1\" ]; then\n  echo \"Usage: $0 <database_name>\"\n  exit 1\nfi\n\nDB_NAME=$1\nEXPORT_DIR=\".\" # Export to the current directory.\n\n# Get a list of all tables in the 'public' schema.\nTABLES=$(psql -d $DB_NAME -t -c \"SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE';\")\n\n# Loop through the tables and export each one to a CSV file.\nfor TBL in $TABLES; do\n  echo \"Exporting table: $TBL\"\n  psql -d $DB_NAME -c \"copy (SELECT * FROM $TBL) TO '$EXPORT_DIR\/$TBL.csv' WITH (FORMAT CSV, HEADER);\"\ndone\n\necho \"Export complete.\"<\/code><\/pre>\n<\/div>\n<p>The script itself is self-explanatory: it exports all tables into the current working directory with the header as the top row and every subsequent row being the data from the table.<\/p>\n<h3>Script for Schema Data<\/h3>\n<p>This script is a bit more clever and more of a unique feature for PostgreSQL. It utilizes its <code>json_agg()<\/code> function which &#8220;is an aggregate function that collects values from multiple rows and returns them as a single JSON array.&#8221; <a href=\"https:\/\/neon.com\/docs\/functions\/json_agg\">source<\/a>. Here is what the script looks like:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">#!\/bin\/bash\n\npsql -d postgres -X -A -t -c \"\nWITH column_details AS (\n    -- First, get all the column info for each table\n    SELECT \n        table_name, \n        json_agg(\n            json_build_object(\n                'column_name', column_name, \n                'data_type', udt_name, \n                'is_nullable', is_nullable,\n                'column_default', column_default\n            ) ORDER BY ordinal_position\n        ) AS columns \n    FROM \n        information_schema.columns \n    WHERE \n        table_schema = 'public' \n    GROUP BY \n        table_name\n),\nprimary_key_details AS (\n    -- Next, find the primary key columns for each table\n    SELECT \n        kcu.table_name, \n        json_agg(kcu.column_name) AS pk_columns\n    FROM \n        information_schema.table_constraints AS tc \n    JOIN \n        information_schema.key_column_usage AS kcu \n        ON tc.constraint_name = kcu.constraint_name AND tc.table_schema = kcu.table_schema\n    WHERE \n        tc.constraint_type = 'PRIMARY KEY' \n        AND tc.table_schema = 'public'\n    GROUP BY \n        kcu.table_name\n)\n-- Finally, join them together\nSELECT \n    json_object_agg(\n        cd.table_name, \n        json_build_object(\n            'primary_key', COALESCE(pkd.pk_columns, '[]'::json),\n            'columns', cd.columns\n        )\n    )\nFROM \n    column_details cd\nLEFT JOIN \n    primary_key_details pkd ON cd.table_name = pkd.table_name;\n\" > schema.json<\/code><\/pre>\n<\/div>\n<p>If you were just grabbing the schema, I think this script would be about <code>half<\/code> of this length, but we actually are grabbing the primary key as well which requires a <code>JOIN<\/code> operation. We grab this data in order to ensure we migrate time series tables into <code>TIME_SERIES<\/code> containers on the GridDB side (more on that later).<\/p>\n<h2>Changes to the GridDB Cloud CLI Tool<\/h2>\n<p>To get this process to work, we needed to first separate out the migrate tool. Prior to this release, the migrate tool only expected to work with GridDB CE, and so, the command worked like this: <code>griddb-cloud-cli migrate [griddb-out-directory]<\/code>. Now obviously this no longer works as we need to indicate to the tool what sort of database we are importing to GridDB Cloud.<\/p>\n<p>So what we did was separate out the commands as sub commands, and this meant keeping the more generic functions that work for both in the root of the command &#8212; things like reading a CSV file, or parsing a JSON file &#8212; and keeping the DB-specific functions inside of the respective subcommand files. So now our <code>migrate\/<\/code> directory has three files instead of one: <code>migrateCmd.go, migrateGridDB.go, and migratePSQL.go<\/code><\/p>\n<p>Here&#8217;s a brief example of a function which is unique to the PostgreSQL import process<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-golang\">func typeSwitcher(s string) string {\n    switch s {\n    case \"bool\":\n        return \"BOOL\"\n    case \"char\", \"varchar\", \"text\":\n        return \"STRING\"\n    case \"int\", \"int2\", \"int4\":\n        return \"INTEGER\"\n    case \"int8\":\n        return \"LONG\"\n    case \"decimal\", \"real\", \"numeric\":\n        return \"FLOAT\"\n    case \"float\", \"float8\":\n        return \"DOUBLE\"\n    case \"timetz\", \"timestamptz\":\n        return \"TIMESTAMP\"\n    default:\n        return strings.ToUpper(s)\n\n    }\n}<\/code><\/pre>\n<\/div>\n<h2>Migrating from PostgreSQL<\/h2>\n<p>Now that we have our data ready for use, let&#8217;s run the migration tool and see the results. First, place the contents of your exporting efforts into their own directory<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">$ mkdir psql_exported\n$ mv *.csv psql_exported\/\n$ mv schema.json psql_exprted\/<\/code><\/pre>\n<\/div>\n<p>And now we can run the tool:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">$ griddb-cloud-cli migrate psql psql_exported\/<\/code><\/pre>\n<\/div>\n<pre><code>{\"container_name\":\"customers\",\"container_type\":\"COLLECTION\",\"rowkey\":false,\"columns\":[{\"name\":\"customer_id\",\"type\":\"INTEGER\",\"index\":null},{\"name\":\"first_name\",\"type\":\"STRING\",\"index\":null},{\"name\":\"last_name\",\"type\":\"STRING\",\"index\":null},{\"name\":\"email\",\"type\":\"STRING\",\"index\":null},{\"name\":\"phone_number\",\"type\":\"STRING\",\"index\":null},{\"name\":\"address\",\"type\":\"STRING\",\"index\":null},{\"name\":\"created_at\",\"type\":\"TIMESTAMP\",\"index\":null}]}\n\u2714 Make Container? \n{\n    \"container_name\": \"customers\",\n    \"container_type\": \"COLLECTION\",\n    \"rowkey\": false,\n    \"columns\": [\n        {\n            \"name\": \"customer_id\",\n            \"type\": \"INTEGER\",\n            \"index\": null\n        },\n        {\n            \"name\": \"first_name\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"last_name\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"email\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"phone_number\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"address\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"created_at\",\n            \"type\": \"TIMESTAMP\",\n            \"index\": null\n        }\n    ]\n} \u2026 YES\n201 Created\ninserting into (customers). csv: psql_exported\/customers.csv\n200 OK\n{\"container_name\":\"products\",\"container_type\":\"COLLECTION\",\"rowkey\":false,\"columns\":[{\"name\":\"id\",\"type\":\"INTEGER\",\"index\":null},{\"name\":\"name\",\"type\":\"STRING\",\"index\":null},{\"name\":\"category\",\"type\":\"STRING\",\"index\":null},{\"name\":\"price\",\"type\":\"FLOAT\",\"index\":null},{\"name\":\"stock_quantity\",\"type\":\"INTEGER\",\"index\":null}]}\n\u2714 Make Container? \n{\n    \"container_name\": \"products\",\n    \"container_type\": \"COLLECTION\",\n    \"rowkey\": false,\n    \"columns\": [\n        {\n            \"name\": \"id\",\n            \"type\": \"INTEGER\",\n            \"index\": null\n        },\n        {\n            \"name\": \"name\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"category\",\n            \"type\": \"STRING\",\n            \"index\": null\n        },\n        {\n            \"name\": \"price\",\n            \"type\": \"FLOAT\",\n            \"index\": null\n        },\n        {\n            \"name\": \"stock_quantity\",\n            \"type\": \"INTEGER\",\n            \"index\": null\n        }\n    ]\n} \u2026 YES\n201 Created\ninserting into (products). csv: psql_exported\/products.csv\n200 OK\n<\/code><\/pre>\n<p>And now, of course, is the last step: checking to make sure our data was successfully migrated.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">$ griddb-cloud-cli show customers                              \n{\n    \"container_name\": \"customers\",\n    \"container_type\": \"COLLECTION\",\n    \"rowkey\": false,\n    \"columns\": [\n        {\n            \"name\": \"customer_id\",\n            \"type\": \"INTEGER\",\n            \"index\": []\n        },\n        {\n            \"name\": \"first_name\",\n            \"type\": \"STRING\",\n            \"index\": []\n        },\n        {\n            \"name\": \"last_name\",\n            \"type\": \"STRING\",\n            \"index\": []\n        },\n        {\n            \"name\": \"email\",\n            \"type\": \"STRING\",\n            \"index\": []\n        },\n        {\n            \"name\": \"phone_number\",\n            \"type\": \"STRING\",\n            \"index\": []\n        },\n        {\n            \"name\": \"address\",\n            \"type\": \"STRING\",\n            \"index\": []\n        },\n        {\n            \"name\": \"created_at\",\n            \"type\": \"TIMESTAMP\",\n            \"timePrecision\": \"MILLISECOND\",\n            \"index\": []\n        }\n    ]\n}<\/code><\/pre>\n<\/div>\n<p>And a quick read:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">$ griddb-cloud-cli read customers -r\n[ { \"name\": \"customers\", \"stmt\": \"select * limit 50\", \"columns\": null, \"hasPartialExecution\": true }]\ncustomer_id,first_name,last_name,email,phone_number,address,created_at,\n[1 Alice Johnson alice.j@email.com 555-0101 123 Maple St, Springfield 2025-09-04T06:32:05.700Z]\n[2 Bob Smith bob.smith@email.com 555-0102 456 Oak Ave, Shelbyville 2025-09-04T06:32:05.700Z]\n[3 Charlie Brown charlie@email.com 555-0103 789 Pine Ln, Capital City 2025-09-04T06:32:05.700Z]\n[4 Diana Prince diana.p@email.com  901 Birch Rd, Themyscira 2025-09-04T06:32:05.700Z]\n[5 Ethan Hunt ethan.hunt@email.com 555-0105 1122 Mission St, Los Angeles 2025-09-04T06:32:05.700Z]<\/code><\/pre>\n<\/div>\n<p>And for fun:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">griddb-cloud-cli read graph products --columns 'stock_quantity'\n[\"stock_quantity\"]\n[ { \"name\": \"products\", \"stmt\": \"select * limit 50\", \"columns\": [\"stock_quantity\"], \"hasPartialExecution\": true }]\n 936 \u2524                                               \u256d\u256e\n 906 \u2524                                               \u2502\u2502\n 876 \u2524                                               \u2502\u2502\n 845 \u2524                                               \u2502\u2570\u256e       \u256d\u256e\n 815 \u2524                                               \u2502 \u2502       \u2502\u2502\n 785 \u2524                                               \u2502 \u2502       \u2502\u2502\n 755 \u2524                                               \u2502 \u2502  \u256d\u2500\u256e  \u2502\u2502\n 724 \u2524                                               \u2502 \u2502  \u2502 \u2502 \u256d\u256f\u2502\n 694 \u2524                                               \u2502 \u2502  \u2502 \u2502 \u2502 \u2570\u256e               \u256d\u256e\n 664 \u2524                                              \u256d\u256f \u2502  \u2502 \u2570\u256e\u2502  \u2502               \u2502\u2502\n 633 \u2524                                              \u2502  \u2502  \u2502  \u2502\u2502  \u2502               \u2502\u2502\n 603 \u2524                                              \u2502  \u2570\u256e\u256d\u256f  \u2570\u256f  \u2502               \u2502\u2502\n 573 \u2524                                              \u2502   \u2502\u2502       \u2502              \u256d\u256f\u2502\n 543 \u2524                                              \u2502   \u2502\u2502       \u2502              \u2502 \u2502\n 512 \u2524                                              \u2502   \u2502\u2502       \u2502              \u2502 \u2570\u256e            \u256d\u256e\n 482 \u2524                                              \u2502   \u2570\u256f       \u2502        \u256d\u256e    \u2502  \u2502            \u2502\u2570\u256e\n 452 \u2524                                              \u2502            \u2502        \u2502\u2502   \u256d\u256f  \u2502            \u2502 \u2502\n 421 \u2524      \u256d\u2500\u256e                                     \u2502            \u2502        \u2502\u2570\u256e  \u2502   \u2502            \u2502 \u2502\n 391 \u2524      \u2502 \u2502        \u256d\u256e                          \u256d\u256f            \u2502       \u256d\u256f \u2502 \u256d\u256f   \u2502            \u2502 \u2502   \u256d\u256e\n 361 \u2524      \u2502 \u2502        \u2502\u2502                          \u2502             \u2570\u256e      \u2502  \u2570\u2500\u256f    \u2502            \u2502 \u2502   \u2502\u2570\u256e\n 331 \u2524      \u2502 \u2502        \u2502\u2570\u256e                         \u2502              \u2502      \u2502         \u2502            \u2502 \u2502  \u256d\u256f \u2570\n 300 \u2524     \u256d\u256f \u2502       \u256d\u256f \u2502       \u256d\u256e                \u2502              \u2502      \u2502         \u2570\u256e    \u256d\u256e    \u256d\u256f \u2502  \u2502\n 270 \u2524     \u2502  \u2502       \u2502  \u2570\u256e      \u2502\u2502                \u2502              \u2502      \u2502          \u2502   \u256d\u256f\u2570\u256e   \u2502  \u2570\u256e \u2502\n 240 \u2524     \u2502  \u2570\u256e      \u2502   \u2502     \u256d\u256f\u2502               \u256d\u256f              \u2502     \u256d\u256f          \u2502  \u256d\u256f  \u2570\u256e  \u2502   \u2502 \u2502\n 209 \u2524    \u256d\u256f   \u2502      \u2502   \u2570\u256e    \u2502 \u2570\u256e         \u256d\u2500\u256e  \u2502               \u2502     \u2502           \u2502  \u2502    \u2570\u256e \u2502   \u2502\u256d\u256f\n 179 \u2524   \u256d\u256f    \u2502     \u256d\u256f    \u2502   \u256d\u256f  \u2502      \u256d\u2500\u2500\u256f \u2502 \u256d\u256f               \u2502     \u2502           \u2502\u256d\u2500\u256f     \u2502 \u2502   \u2502\u2502\n 149 \u2524  \u256d\u256f     \u2502     \u2502     \u2570\u256e  \u2502   \u2570\u256e    \u256d\u256f    \u2570\u256e\u2502                \u2502     \u2502           \u2570\u256f       \u2570\u256e\u2502   \u2502\u2502\n 119 \u2524 \u256d\u256f      \u2502  \u256d\u256e \u2502      \u2502\u256d\u2500\u256f    \u2502   \u256d\u256f      \u2570\u256f                \u2502     \u2502                     \u2570\u256f   \u2502\u2502\n  88 \u2524\u256d\u256f       \u2502 \u256d\u256f\u2570\u2500\u256f      \u2570\u256f      \u2570\u2500\u256e\u256d\u256f                         \u2502     \u2502                          \u2570\u256f\n  58 \u253c\u256f        \u2570\u2500\u256f                    \u2570\u256f                          \u2502   \u256d\u2500\u256f\n  28 \u2524                                                            \u2570\u2500\u2500\u2500\u256f\n                                       Col names from container products\n\n                                                \u25a0 stock_quantity<\/code><\/pre>\n<\/div>\n<h2>Conclusion<\/h2>\n<p>Never has it been easier to migrate from an on-prem SQL database to GridDB Cloud, and we hope these tools make any of those looking to try out GridDB Cloud a much simpler process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the form of JSON files. Included in that was also the ability to migrate from GridDB Community Edition (on prem) to the Cloud in just a few commands; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":52246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-52245","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-03T07:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Israel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Israel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\"},\"author\":{\"name\":\"Israel\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\"},\"headline\":\"Migrate from PostgreSQL to GridDB Cloud\",\"datePublished\":\"2025-10-03T07:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\"},\"wordCount\":781,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\",\"url\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\",\"name\":\"Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png\",\"datePublished\":\"2025-10-03T07:00:00+00:00\",\"description\":\"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png\",\"contentUrl\":\"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png\",\"width\":1024,\"height\":1024},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740\",\"name\":\"Israel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g\",\"caption\":\"Israel\"},\"url\":\"https:\/\/griddb.net\/en\/author\/israel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT","description":"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/","og_locale":"en_US","og_type":"article","og_title":"Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT","og_description":"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the","og_url":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2025-10-03T07:00:00+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png","type":"image\/png"}],"author":"Israel","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Israel","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/"},"author":{"name":"Israel","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740"},"headline":"Migrate from PostgreSQL to GridDB Cloud","datePublished":"2025-10-03T07:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/"},"wordCount":781,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/","url":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/","name":"Migrate from PostgreSQL to GridDB Cloud | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png","datePublished":"2025-10-03T07:00:00+00:00","description":"In a previous article, we talked about some new features in the GridDB Cloud CLI Tool which showcased the ability to make tables based on schemas in the","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/blog\/migrate-psql-griddb-cloud\/#primaryimage","url":"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png","contentUrl":"\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_lbdq64lbdq64lbdq.png","width":1024,"height":1024},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/c8a430e7156a9e10af73b1fbb46c2740","name":"Israel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4df8cfc155402a2928d11f80b0220037b8bd26c4f1b19c4598d826e0306e6307?s=96&d=mm&r=g","caption":"Israel"},"url":"https:\/\/griddb.net\/en\/author\/israel\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/52245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=52245"}],"version-history":[{"count":0,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/52245\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/52246"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=52245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=52245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=52245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}