Query a table in one database from another

Image by Gratisography on Pexels

A foreign data wrapper is an extension available in PostgreSQL that allows you to access a table or schema in one database from another. Foreign data wrappers can serve all sorts of purposes:

Let’s go!

For this example, we’ll use the databases localdb and foreigndb. I want to access a table account_metrics in foreigndb from localdb:

postgres=# \lList of databasesName…


Using movie metadata to find thematically-linked films with natural language processing.

Click here to read part 1, which deals with popularity recommenders.

Have you ever browsed a website that’s recommended something to you? Whether it’s Facebook suggesting you add someone as a friend, Amazon proclaiming that they think you’ll enjoy a specific product, or Hulu suggesting a new TV show, recommender systems are widely used by websites to drive traffic and sales.

In a previous post, I detailed why I chose to make a movie recommender. The short and sweet version is that I wanted to recommend myself movies, but…


Recommender systems. What are they, and why should you care?

Well, it turns out, everywhere uses recommender systems these days. The New York Times, Reddit, YouTube, and Amazon (to name a few) all make use of these systems in various ways to drive traffic and sales, and bring you, the user, what you’re looking for.

When people think of movie recommenders, they’ll most frequently think about Netflix, whose algorithm is such to keep users coming back again and again to watch new and exciting things.

I decided to make my own recommender system, so that I could recommend myself new…

Eve Ben Ezra

Backend developer (Go, Python, SQL) and data engineer, who is learning all the time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store