What is “a NocoDB”? Can I eat it?
NocoDB is a no-code database platform, which in practice means you can design and manage databases without writing a single line of SQL. In this space, its most well-known competitor is probably Airtable, and while it might be more polished, NocoDB has a key advantage: it’s open source and can be self-hosted. This makes it tasty despite not being edible.
You can also present and manage your data in formats that aren’t tables, by creating interactive views. You can display your data as a calendar, a card-style gallery, or a Kanban board. In addition, you can build forms that when filled, new entries are created directly in your database table. So, it’s actually multiple productivity apps in one.
Images Source: NocoDB
Cool, but why would I care?
Let’s see if this sounds familiar: You ask your coworkers for some data, and they send you an Excel file with a table structure that barely makes sense. So, you clean it up, maybe even provide them with a template. But next month, they will change the format and write comments on random cells (Despite Excel having a big āAdd Commentā button) that will break your automations.
In contrast, NocoDB has an excellent collaboration system with role-based permissions, allowing multiple people to work on the same databases. This opens two possibilities: First, writing and storing data in a standardised table format ideal for analysis, and second, custom views generate actionable data from your pals’ work without them changing habits. It’s a win-win for everybody, as you get clean, ready-to-use information, and your colleagues in administration get a productivity tool that somehow keeps you from yelling and crying at them.
When it comes to data analysis, there are three ways to import and export information in NocoDB: CSV, REST API, and PostgreSQL (last one available only if you self-host). This not only provides flexibility, but also gives beginners in data analysis a way to practice different methods of reading and writing information with their tools.
Convinced to give it a try? Let’s deploy NocoDB!
I know that closing my first post about data analysis talking about DevOps is quite chaotic, but in my opinion, a good data analyst must get their hands dirty on other fields too. Also, you can always ask your Systems Administrator about this.
My preferred method is self-hosting it in a local server (think Raspberry Pi or an old desktop/laptop) with Docker Compose. This way you can share this tool internally with your colleagues. While NocoDB offers multiple templates in their Github repo, I prefer using this one, consisting of docker-compose.yml
:
services:
nocodb:
depends_on:
pg_nocodb:
condition: service_healthy
environment:
NC_DB: "pg://pg_nocodb:5432?u=${POSTGRES_USER:-postgres}&p=${POSTGRES_PASSWORD:-password}&d=${POSTGRES_DB:-postgres}"
image: "nocodb/nocodb:latest"
restart: unless-stopped
user: "1000:1000"
volumes:
- "./nc_data:/usr/app/data"
pg_nocodb:
environment:
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
ports:
- "5432:5432"
healthcheck:
interval: 10s
retries: 10
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
timeout: 2s
image: postgres:16.6
restart: unless-stopped
volumes:
- "./db_data:/var/lib/postgresql/data"
And an environment file .env
where you should change the password:
POSTGRES_USER=postgres
POSTGRES_PASSWORD=pleasechangethispasswordASAP
POSTGRES_DB=postgres_nocodb
From here, it’s up to you. You have the documentation an the official video tutorials to start your journey. Cheers!