{"id":46569,"date":"2018-06-06T00:00:00","date_gmt":"2018-06-06T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/using-griddb-foreign-data-wrapper-postgresql\/"},"modified":"2025-11-13T12:54:35","modified_gmt":"2025-11-13T20:54:35","slug":"using-griddb-foreign-data-wrapper-postgresql","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/","title":{"rendered":"Using the GridDB Foreign Data Wrapper for PostgreSQL"},"content":{"rendered":"<h2 id=\"intro\">Introduction<\/h2>\n<p>There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence applications it is still needed to access your data with traditional <b>SQL queries<\/b>. Luckily a <code>FOREIGN DATA WRAPPER<\/code> for <b>PostgreSQL and GridDB<\/b> has been released and is available on <a href=\"https:\/\/github.com\/pgspider\/griddb_fdw\" title=\"GridDB Foreign Data Wrapper for PostgreSQL repository\">Github<\/a>.<br \/>\nIn this post, we will be going over how to properly build and install the foreign data wrapper as well as how to create the <code>EXTENSION<\/code> in PostgreSQL for a GridDB server. We will also demonstrate ways to translate GridDB containers into PostgreSQL table schemas quickly through the wrapper as well as ways we can manipulate GridDB data using standard SQL queries.<\/p>\n<style>\nul {\n    padding-left: 36px;\n}\n.toc_container {\n    border: 1px solid #aaa !important;\n    display: table !important;\n    font-size: 95%;\n    margin-bottom: 1em;\n    padding: 20px;\n    width: auto;\n}\n.toc_title {\n    font-weight: 700;\n    text-align: center;\n}\n.toc_container li, .toc_container ul, .toc_container ul li, .toc_container ol li{\n    list-style: outside none none !important;\n}\n<\/style>\n<div id=\"toc-block\" style=\"background: #f9f9f9 none repeat scroll 0 0;border: 1px solid #aaa; padding: 20px; width: auto; display: table;margin-bottom: 1em;\">\n<h5 id=\"toc\">Table of Contents<\/h5>\n<div class=\"toc_container\">\n<ul id=\"toc-list\" style=\"list-style-type: none !important;\">\n<li>1 &nbsp;&nbsp;&nbsp;<a href=\"#postgresql-source\">Installing PostgreSQL from Source<\/a><\/li>\n<li>2 &nbsp;&nbsp;&nbsp;<a href=\"#obtaining-fdw\">Installing the GridDB Foreign Data Wrapper for PostgreSQL<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>2.1 <a href=\"#verify-installation\">Possible Build Issues<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>3 &nbsp;&nbsp;&nbsp;<a href=\"#accessing-griddb\">Connecting to GridDB from PostgreSQL<\/a><\/li>\n<li>4 &nbsp;&nbsp;&nbsp;<a href=\"#table-access\">Accessing GridDB Containers<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>4.1 <a href=\"#viewing-containers\">Viewing Available Containers<\/a><\/li>\n<li>4.2 <a href=\"#creating-foreign-table\">Creating Foreign Tables<\/a><\/li>\n<li>4.3 <a href=\"#limitations\">Limitations<\/a><\/li>\n<li>4.4 <a href=\"#column-mapping\">Mapping Columns<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>5 &nbsp;&nbsp;&nbsp;<a href=\"#queries\">SQL Queries<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>5.1 <a href=\"#selecting-data\">Selecting Data<\/a><\/li>\n<li>5.2 <a href=\"#modifying-data\">Modifying Data with SQL<\/a><\/li>\n<li>5.3 <a href=\"#grouping-data\">Grouping Data<\/a><\/li>\n<li>5.4 <a href=\"#merging-tables\">Join Operations<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>6 &nbsp;&nbsp;&nbsp;<a href=\"#conclusion\">Conclusion<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>6.1 <a href=\"#reference\">Reference<\/a><\/li>\n<li>6.2 <a href=\"#source-code\">Source Code<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h3 id=\"postgresql-source\">Building a PostgreSQL Database from Source<\/h3>\n<p>The easiest and simplest way to <i>build and compile<\/i> the <b>GridDB Foreign Data Wrapper for PostgreSQL<\/b> source code is to use it in a PostgreSQL installation that is built from <b>source code<\/b>. As of this post, the GridDB Foreign Data Wrapper for PostgreSQL is compatible with PostgreSQL versions <a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/index.html\" title=\"PostgreSQL 9.6 Documentation\">9.6<\/a> and <a href=\"https:\/\/www.postgresql.org\/docs\/10\/static\/index.html\">10.0<\/a>. This post is covered for a PostgreSQL 9.6 database.<br \/>\nYou can obtain the source code from PostgreSQL&#8217;s <a href=\"https:\/\/www.postgresql.org\/ftp\/source\/v9.6.9\/\" title=\"PostgreSQL 9.6.9 source code\">ftp download site<\/a>.<\/p>\n<pre class=\"prettyprint\">\n$ cd \/usr\/\n$ wget https:\/\/ftp.postgresql.org\/pub\/source\/v9.6.9\/postgresql-9.6.9.tar.gz\n$ tar xvfz postgresql-9.6.9.tar.gz\n<\/pre>\n<p>From there just follow <a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/install-procedure.html\" title=\"Installing PostgreSQL 9.6 from source\">this guide<\/a> to build, install, and test PostgreSQL.<\/p>\n<h3 id=\"obtaining-fdw\">Obtaining and installing the GridDB Foreign Data Wrapper for PostgreSQL<\/h3>\n<p>Once a <i>source installation<\/i> of PostgreSQL has been completed on your system, obtain the GridDB Foreign Data Wrapper for PostgreSQL&#8217;s source code repository from Githu (the name of the repository is <code>griddb_fdw<\/code>) and placed it in the installation&#8217;s <code>contrib<\/code> directory.<\/p>\n<pre class=\"prettyprint\">\n$ cd \/path\/to\/postgresql\/source\/installation\/contrib\n$ git clone https:\/\/github.com\/pgspider\/griddb_fdw\n<\/pre>\n<p>The GridDB Foreign Data Wrapper for PostgreSQL requires a fully built <b>GridDB C client<\/b> along with it. You will need to obtain the C client from <a href=\"https:\/\/github.com\/griddb\/c_client\">GitHub<\/a> and follow its <code>README.md<\/code> instructions to build and install.<\/p>\n<ul>\n<li><b>NOTE: <\/b>The C client directory must be named <code>griddb<\/code> instead of <code>c_client<\/code> in order for the GridDB Foreign Data Wrapper for PostgreSQL to fully build.\n<\/ul>\n<pre class=\"prettyprint\">\n$ cd griddb_fdw\n$ git clone https:\/\/github.com\/griddb\/c_client\n$ mv c_client griddb\n$ cd griddb\n## Follow the repository's README instructions for building the C client.\n<\/pre>\n<p>General details on setting and installing GridDB&#8217;s C client can be found on either in the <code>README.md<\/code> file from the C client&#8217;s Github repository or from <a href=\"https:\/\/griddb.net\/en\/blog\/using-griddbs-cpythonruby-apis\/\" title=\"C \/ Python API Post\">this post about using GridDB&#8217;s different APIs<\/a>.<br \/>\nOnce the <b>C client<\/b> is built and installed properly the Foreign Data wrapper can be built on the <code>griddb_fdw<\/code> directory.<\/p>\n<pre class=\"prettyprint\">\n$ cd \/path\/to\/griddb_fdw\n$ make\n$ make install\n<\/pre>\n<ul>\n<li><b>Note: <\/b> the <code>Makefile<\/code> used for building the GridDB Foreign Data Wrapper for PostgreSQL makes references to the <code>src\/<\/code> and <code>contrib\/<\/code> directories of PostgreSQL, some of which cannot be found without installing PostgreSQL from <i>source<\/i>.\n<\/ul>\n<h4 id=\"verify-installation\">Possible Issues<\/h4>\n<p>In order for the GridDB Foreign Data Wrapper for PostgreSQL to work with SQL Queries, all the <code>.o<\/code> and <b>executable<\/b> files should be placed in the <code>\/usr\/local\/pgsql\/share\/extension\/<\/code> directory on your system. Usually the <code>make install<\/code> command does this automatically, but in the case that you receive errors like:<\/p>\n<pre class=\"prettyprint\">\nERROR: could not open extension control file:\n<\/pre>\n<p>Simply copy all the compiled <code>.o<\/code> and <b>executable<\/b> files into the <code>share\/extension<\/code> directory.<\/p>\n<pre class=\"prettyprint\">\n$ cd \/path\/to\/postgresql\/source\/installation\/contrib\/griddb_fdw\n$ make clean\n$ make\n$ cp * \/usr\/local\/pgsql\/share\/extension\n<\/pre>\n<h3 id=\"accessing-griddb\">Accessing a GridDB Cluster<\/h3>\n<p>Now that the <b>GridDB Foreign Data Wrapper for PostgreSQL<\/b> is installed, we can access GridDB data using <code>SQL<\/code> queries through a PostgreSQL database.<br \/>\nTo begin, an extension must be added to PostgreSQL for GridDB using the <code>CREATE EXTENSION<\/code> command. The name of the GridDB&#8217;s extension is <code>'griddb_fdw'<\/code>. To access foreign data, PostgreSQL needs a foreign <code>SERVER<\/code> and a <code>USER MAPPING<\/code> to connect and authenticate into GridDB. The configurations needed to connect to a GridDB cluster must be specified in the <code>OPTIONS<\/code> flags for these commands.<br \/>\nYou can automatically create foreign tables for existing containers in your GridDB server and import them into the PostgreSQL of your choice. This can be done with the <code>IMPORT FOREIGN SCHEMA<\/code> command. The name of the remote schema for GridDB is <code>'griddb_schema'<\/code>. In the example<br \/>\nbelow, we will be accessing our GridDB database from the <code>'public'<\/code> database in PostgreSQL.<\/p>\n<pre class=\"prettyprint\">\n-- Name of the built extension for GridDB is 'griddb_fdw'\nCREATE EXTENSION griddb_fdw;\n-- The host, port, cluster name, username, and password are needed for\n-- PostgreSQL to access your GridDB server. These can be specified in the 'OPTIONS' field\nCREATE SERVER griddb_svr FOREIGN DATA WRAPPER griddb_fdw OPTIONS(host '239.0.0.1', port '31999', clustername 'defaultCluster');\nCREATE USER MAPPING FOR public SERVER griddb_svr OPTIONS(username 'admin', password 'admin');\n-- The name of the remote schema needed to create and load foreign tables from GridDB container\n-- is named 'griddb_schema'\nIMPORT FOREIGN SCHEMA griddb_schema FROM SERVER griddb_svr INTO public;\n<\/pre>\n<p>Once this is complete the foreign <code>SERVER<\/code> will encapsulate the connection information to GridDB that the GridDB Foreign Data Wrapper for PostgreSQL (the <code>griddb_fdw<\/code> extension) will use as its data source.<\/p>\n<h3 id=\"table-access\">Accessing GridDB Containers from PostgreSQL<\/h3>\n<p>Once the GridDB foreign data wrapper for PostgreSQL is setup and your PostgreSQL database is connected to your GridDB server, GridDB containers and their data can now be accessed with <code>SQL<\/code> queries.<\/p>\n<h4 id=\"viewing-containers\">Viewing Available Containers<\/h4>\n<p>All the available <i>foreign tables<\/i> imported from GridDB can be viewed by querying the <code>information_schema._pg_foreign_tables<\/code> table.<br \/>\n<b>Example Query: <\/b><\/p>\n<pre class=\"prettyprint\">\nSELECT foreign_table_name FROM information_schema._pg_foreign_tables;\n<\/pre>\n<p><b>Example Output<\/b><\/p>\n<pre class=\"prettyprint\">\nforeign_table_name\n-------------------------\nemployee\ndepartment\njp_prefecture\njp_prefecture_readings\nwater_quality_ts_3\n<\/pre>\n<h4 id=\"creating-foreign-table\">Creating Foreign Tables<\/h4>\n<p>There may be times when the tables imported from <code>griddb_schema<\/code> may not be truly reflective of all the containers in the GridDB database and we need to manually recreate the mapping for that container in PostgreSQL. This can be done by issuing a <code>CREATE FOREIGN TABLE<\/code> command to PostgreSQL.<br \/>\nFor example let us say we have a TimeSeries container named <code>jp_prefecture_readings<\/code> that records timestamped temperature readings from many sensors in an area and we wish to model this as a <b>FOREIGN TABLE<\/b> in PostgreSQL.<br \/>\nIt could have the below <a href=\"https:\/\/griddb.net\/en\/docs\/documents\/5-1-6_container-schema.php\">row-schema<\/a> in the <a href=\"https:\/\/github.com\/griddb\/griddb_nosql\">GridDB Java API<\/a>.<\/p>\n<pre class=\"prettyprint\">\npublic class InstrumentLog {\n             @RowKey\n             public Date timestamp;  \/\/Timestamp Column (Primary Key for Timeseries containers)\n             public String weatherstationid; \/\/String column for the sensor of recording\n             public double temperature; \/\/Temperature reading (Double Column)\n             public Blob liveimage; \/\/Image recording (Binary Stream Data or Blob Column)\n}\n<\/pre>\n<p>The above GridDB container schema would then be converted to the below <code>FOREIGN TABLE<\/code> in PostgreSQL that we can then manipulate with <b>SQL<\/b>. Note that when creating foreign table you must <b>specify the foreign server<\/b> that PostgreSQL will use to find the foreign container.<\/p>\n<pre class=\"prettyprint\">\nCREATE FOREIGN TABLE jp_prefecture_readings (\n                  timestamp timestamp,\n                  weatherstationid text,\n                  temperature float,\n                  liveimage bytea\n) SERVER griddb_svr;\n<\/pre>\n<p>The general format for creating the FOREIGN TABLE is:<\/p>\n<pre class=\"prettyprint\">\nCREATE FOREIGN TABLE name_of_container_in_foreign_database (\n                 [ column_name column_type ]\n) SERVER foreign_server_name;\n<\/pre>\n<p>Ensure that your column names for both the PostgreSQL foreign table and its corresponding GridDB container are equivalent to prevent any <code>column not found<\/code> errors. Also ensure that the column types <a href=\"#column-mapping\">are equivalent<\/a> to prevent any <code>type mismatch<\/code> errors in your SQL queries.<\/p>\n<h4 id=\"limitations\">Limitations<\/h4>\n<p>An important thing to note is that while GridDB rows can be created and destroyed through PostgreSQL, the actual containers that store them cannot. This means that you <i>cannot<\/i> use PostgreSQL queries to create or drop a container in GridDB.<br \/>\nA <code>CREATE FOREIGN TABLE<\/code> statements creates a table schema mapping for PostgreSQL to use based on an <b>existing<\/b> container in GridDB. The <code>DROP FOREIGN TABLE<\/code> statement will remove the GridDB container from the <code>information_schema._pg_foreign_tables<\/code> table in PostgreSQL, but leave the container and its data intact in the GridDB database. This means you can no longer access that table from PostgreSQL anymore until create the <code>FOREIGN TABLE<\/code> again but still access the container through GridDB&#8217;s APIs or with <a href=\"https:\/\/griddb.net\/en\/docs\/documents\/3-3_tql.php\" title=\"TQL\">TQL queries<\/a>.<\/p>\n<h4 id=\"column-mapping\">Column Type Reference<\/h4>\n<p>For the most part, most column types in GridDB have an equivalent type in PostgreSQL that can be used to create a corresponding foreign table. Below are some of the corresponding column types in PostgreSQL that may not be so obvious.<\/p>\n<table id=\"column-mappings\" style=\"padding-left: 5% !important; width: 100%; border-color: black !important;\" border=\"1\">\n<thead>\n<tr>\n<td style=\"padding-left: 5% !important;\">GridDB Column Type<\/td>\n<td style=\"padding-left: 5% !important;\">PostgreSQL Column Type<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding-left: 5% !important;\">bool, boolean<\/td>\n<td style=\"padding-left: 5% !important;\">boolean<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">byte<\/td>\n<td style=\"padding-left: 5% !important;\">char<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">double, float<\/td>\n<td style=\"padding-left: 5% !important;\">float, real<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">blob<\/td>\n<td style=\"padding-left: 5% !important;\">bytea<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">string<\/td>\n<td style=\"padding-left: 5% !important;\">text<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<ul>\n<li><b>NOTE: <\/b>There may be issues storing <b>LONG<\/b> column values to their full capacity using the GridDB Foreign Data Wrapper for PostgreSQL. This may be due to <code>long<\/code> column types in GridDB containers being truncated to <code>integer<\/code> types when being converted into foreign PostgreSQL tables. This could lead to issues with <b>inserting<\/b> numerical data <b>over 2147483647<\/b>.\n<\/ul>\n<h3 id=\"queries\">Issuing SQL Queries<\/h3>\n<p>Now that we can wrap any GridDB container into a PostgreSQL table, we can incorporate many SQL functionalities with our GridDB data that were not available through TQL.<br \/>\nTo begin we can now SELECT individual columns from our containers or <code>SELECT DISTINCT<\/code> column values as well.<\/p>\n<h4 id=\"selecting-data\">Selecting Data<\/h4>\n<pre class=\"prettyprint\">\n-- Exclude the 'liveimage' (type BLOB \/ BYTEA) column from our SELECT query\nSELECT weatherstationid FROM jp_prefecture_readings ORDER BY weatherstationid ASC;\n-- Find all the unique temperature values from our timestamp measurements\nSELECT DISTINCT temperature FROM jp_prefecture_readings ORDER BY temperature ASC;\n<\/pre>\n<p><b>Sample Output: <\/b><\/p>\n<pre class=\"prettyprint\">\n        name         | latitude | longitude\n---------------------+----------+-----------\n Hokkaido-Sapporo    | 43.06417 | 141.34694\n Aomori-Aomori       |    48.83 |    140.75\n Iwate-Morioka       | 39.70361 |  141.1525\n-- (snip)\n temperature\n-------------\n          50\n        55.6\n          70\n          80\n(4 rows)\n<\/pre>\n<h4 id=\"modifying-data\">Modifying Data<\/h4>\n<p>We can also modify data our with SQL queries which includes <code>INSERT<\/code>, <code>UPDATE<\/code>, and <code>DELETE<\/code> statements.<\/p>\n<pre class=\"prettyprint\">\n-- Insert Data into GridDB Containers\nINSERT INTO jp_prefecture (id,name,latitude,longitude,hascamera)\n  VALUES ('weather_station_48','Tsukishima',35.662,139.776,false);\nINSERT INTO jp_prefecture_readings (timestamp, weatherstationid, temperature, liveimage)\n  VALUES('2018-05-20 12:35:55.789','weather_station_0',55.6,bytea('x533435363741'));\n-- (snip)\n-- Update Queries\nUPDATE water_quality_ts_3 SET water_temperature = 18.5 WHERE beach_name LIKE '%met Beach';\nUPDATE jp_prefecture SET latitude = 48.83, longitude = 140.75 WHERE id = 'weather_station_2' AND name='Aomori-Aomori';\n-- (snip)\n-- Delete Data from GridDB Containers\nDELETE FROM jp_prefecture WHERE name='Tsukishima';\nDELETE FROM jp_prefecture_readings\n  WHERE weatherstationid LIKE '%0' AND temperature > 50.0 AND temperature <= 60.0;\n-- Delete all rows from a GridDB Container\nDELETE FROM jp_prefecture;\n<\/pre>\n<h4 id=\"grouping-data\">Aggregating and Grouping Data<\/h4>\n<p>We can also aggregate and categorize our GridDB to a deeper level with <code>GROUP BY<\/code> clauses.<\/p>\n<pre class=\"prettyprint\">\n-- Aggregation Operations coupled with Group By Operations\n-- Determine and display the average temperature every unique weather station id\n-- The 'weatherstationid' could represent an individual weather or climate sensor\nSELECT weatherstationid, AVG(temperature) AS average_temp FROM jp_prefecture_readings\n  GROUP BY weatherstationid ORDER BY average_temp ASC;\n<\/pre>\n<p><b>Sample Output: <\/b><\/p>\n<pre class=\"prettyprint\">\n  weatherstationid  |   average_temp\n--------------------+------------------\n weather_station_0  |             55.6\n weather_station_44 |               60\n weather_station_12 | 63.3333333333333\n weather_station_32 |               64\n weather_station_26 |               64\n weather_station_38 |               64\n weather_station_20 |               64\n weather_station_22 | 66.6666666666667\n weather_station_36 | 66.6666666666667\n weather_station_6  | 66.6666666666667\n weather_station_24 | 67.1428571428571\n weather_station_4  | 67.1428571428571\n weather_station_28 | 67.1428571428571\n weather_station_16 | 67.1428571428571\n weather_station_43 |             67.5\n weather_station_23 |             67.5\n weather_station_15 |             67.5\n weather_station_27 |             67.5\n weather_station_17 |             67.5\n<\/pre>\n<h4 id=\"merging-tables\">Merging Tables<\/h4>\n<p>We can also merge tables from multiple containers by selecting from <b>multiple foreign tables<\/b> or using <code>UNION<\/code> queries. It is also possible to merge data from containers that share related column values with <code>JOIN<\/code> operations.<\/p>\n<pre class=\"prettyprint\">\n-- Selecting from multiple tables\nSELECT jp.id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp, jp_prefecture_readings jpr WHERE jp.id = 'weather_station_18'\n  ORDER BY jpr.timestamp DESC;\n-- Join Operations\nSELECT jp.id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp INNER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp LEFT OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp RIGHT OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp FULL OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\n-- Union operations\nSELECT id FROM jp_prefecture\n  UNION\nSELECT weatherstationid FROM jp_prefecture_readings;\nSELECT id FROM jp_prefecture\n  UNION ALL\nSELECT weatherstationid FROM jp_prefecture_readings;\n<\/pre>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>GridDB's Foreign Data Wrapper for PostgreSQL can give applications a simple and quick way to access all your GridDB data from PostgreSQL. Rather than having to go through the lengthy process of migrating a whole GridDB database to PostgreSQL, simply use the GridDB's foreign data wrapper to convert the GridDB containers from the GridDB cluster into PostgreSQL tables in a way that is seamless and automatic.<br \/>\nThis new component will make incorporating GridDB data into legacy applications that still use SQL interfaces much easier. With GridDB's foreign data wrapper for PostgreSQL, you can now have both the fast and scalable performance of GridDB along with the additional data management tools that SQL systems and queries provide.<\/p>\n<h4 id=\"reference\">Reference<\/h4>\n<ul id=\"reference-list\">\n<li>\n<p><a href=\"https:\/\/github.com\/griddb\/griddb_nosql\/releases\/download\/v3.0.1\/griddb_nosql-3.0.1-1.linux.x86_64.rpm\" title=\"Download GridDB CE\">GridDB Community Edition 3.0.1<\/a> was used as the GridDB database and server for this post.<\/p>\n<\/li>\n<li>\n<p>The GridDB C Client used for this post was the <b>open-source<\/b> version for <b>Community Edition<\/b>, whose code is available for download at this <a href=\"https:\/\/github.com\/griddb\/c_client\/archive\/v3.0.1.tar.gz\" title=\"GridDB C Client Source Code\">here<\/a> and documentation can be found <a href=\"http:\/\/www.griddb.org\/griddb_nosql\/manual\/GridDB_API_Reference.html#sec-6\" title=\"GridDB C client API reference\">in this section<\/a> of the GridDB API reference.<\/p>\n<\/li>\n<li>\n<p>Both the GridDB C client the GridDB foreign data wrapper were built using <a href=\"https:\/\/gcc.gnu.org\/gcc-4.8\/\">gcc version 4.8.5<\/a><\/p>\n<\/li>\n<li>\n<p>All the queries and sample code on this post were performed on a <b>CentOS 7.3 operating system<\/b><\/p>\n<\/li>\n<li>\n<p>\n<a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a> version <b>9.6.9<\/b> was used for this post and was built by installing it directly from <a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/sourcerepo.html\">source code<\/a>.<\/p>\n<\/li>\n<li>\n<p>More details on PostgreSQL <b>foreign data wrappers<\/b> can be found on this <a href=\"https:\/\/wiki.postgresql.org\/wiki\/Foreign_data_wrappers\" title=\"Foreign Data Wrappers in PostgreSQL\">PostgreSQL wiki page<\/a><\/p>\n<\/li>\n<li>\n<p>If you wish to learn more about migrating relational or SQL databases to GridDB, feel free to check out our posts on <a href=\"https:\/\/griddb.net\/en\/blog\/migrating-from-mysql-to-griddb\/\" title=\"MySQL to GridDB Migration\">MySQL to GridDB<\/a> or <a href=\"https:\/\/griddb.net\/en\/blog\/migrating-from-postgresql-to-griddb\/\" title=\"PostgreSQL to GridDB Migration\">PostgreSQL to GridDB<\/a> database migrations or the documentation on using <a href=\"https:\/\/griddb.net\/en\/docs\/documents\/6-5_migration-from-other-databases.php\" title=\"GridDB SE Import \/ Export Tools\">import and export functions<\/a> with GridDB Standard Edition.<\/p>\n<\/li>\n<li>\n<p>GridDB also provides <a href=\"https:\/\/griddb.net\/en\/docs\/documents\/7-1_jdbc-connector.php\" title=\"GridDB JDBC Connector for Advanced Edition\">JDBC<\/a> and <a href=\"https:\/\/griddb.net\/en\/docs\/documents\/7-2_odbc-connector.php\" title=\"GridDB ODBC Connector for Advanced Edition\">ODBC<\/a> connectors which can also be used for interfacing GridDB with SQL queries and databases.<\/p>\n<\/li>\n<li>\n<p>More details on understanding how to interact with <b>foreign servers<\/b> in PostgreSQL can be found from this <a href=\"https:\/\/robots.thoughtbot.com\/postgres-foreign-data-wrapper\">thoughtbot blog post<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h4 id=\"source-code\">Source Code<\/h4>\n<p>All the source code used in this post can be downloaded from the link below.<\/p>\n<ul id=\"source-code-download\">\n<li>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/griddb.net\/en\/download\/25142\/?tmstv=1775238783\" rel=\"nofollow\" id=\"download-link-25142\" data-redirect=\"false\" >\n\tgriddb_postgresql_fdw_sample\t(1890 downloads\t)\n<\/a>\n\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence applications it is still needed to access your data with traditional SQL queries. Luckily a FOREIGN DATA WRAPPER for PostgreSQL and GridDB has been released and is available on Github. In this post, [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":25798,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46569","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>Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence\" \/>\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\/using-griddb-foreign-data-wrapper-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\" \/>\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=\"2018-06-06T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:54:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2018\/06\/blog_title_24.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joshua Pascascio\" \/>\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=\"Joshua Pascascio\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 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\/using-griddb-foreign-data-wrapper-postgresql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\"},\"author\":{\"name\":\"Joshua Pascascio\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\"},\"headline\":\"Using the GridDB Foreign Data Wrapper for PostgreSQL\",\"datePublished\":\"2018-06-06T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\"},\"wordCount\":1615,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\",\"url\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\",\"name\":\"Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"datePublished\":\"2018-06-06T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:54:35+00:00\",\"description\":\"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"contentUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"width\":870,\"height\":490},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\",\"name\":\"Joshua Pascascio\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"caption\":\"Joshua Pascascio\"},\"url\":\"https:\/\/griddb.net\/en\/author\/joshua\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT","description":"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence","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\/using-griddb-foreign-data-wrapper-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence","og_url":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2018-06-06T07:00:00+00:00","article_modified_time":"2025-11-13T20:54:35+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2018\/06\/blog_title_24.png","type":"image\/png"}],"author":"Joshua Pascascio","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Joshua Pascascio","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/"},"author":{"name":"Joshua Pascascio","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8"},"headline":"Using the GridDB Foreign Data Wrapper for PostgreSQL","datePublished":"2018-06-06T07:00:00+00:00","dateModified":"2025-11-13T20:54:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/"},"wordCount":1615,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/","url":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/","name":"Using the GridDB Foreign Data Wrapper for PostgreSQL | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","datePublished":"2018-06-06T07:00:00+00:00","dateModified":"2025-11-13T20:54:35+00:00","description":"Introduction There are times when data needs the flexibility to be accessed from several different interfaces. For many legacy and business intelligence","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/blog\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage","url":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","contentUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","width":870,"height":490},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8","name":"Joshua Pascascio","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","caption":"Joshua Pascascio"},"url":"https:\/\/griddb.net\/en\/author\/joshua\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46569","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\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46569"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46569\/revisions"}],"predecessor-version":[{"id":51260,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46569\/revisions\/51260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/25798"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}