Skip to content
Keboola Docs

Load from a database

Load tables from an external database with the Snowflake data source connector, against a sample database that needs no credentials of your own.

How-to Going further about 10 minutes

A side trip from Get your data in: a source behind credentials rather than a public URL. Every database connector Keboola has works this way, so walking one teaches all of them.

Where you are: you can load a public file already. When you finish: three tables in Storage, pulled out of a live database.

Before you start

You need

  • A Keboola project. No project yet? Get a project.
  • Keboola’s sample Snowflake database, whose login is printed on this page.

Depending on the tab you use

  • Prompt tab: Kai, the Kai Agent button in the project's top bar, on supported stacks. The first time, an organization admin switches it on; see Get started with Kai.
  • UI tab: only a browser.
  • CLI / API tab: kbagent, connected to your project with write access.

Three ways to do this, one page. They are alternatives, not steps. Prompt is what you paste into Kai; UI is the same task click by click, for when you want to see where each setting lives; CLI / API is the same task from a terminal, with the raw request beside it. Pick one tab and carry on; your choice follows you to the next page.

Kai asks before it changes anything: expect one approval dialog per object it creates, showing the exact configuration it is about to write. Questions that only read do not ask. If confirming each one gets tiring, pre-approve tools in tool permissions. The chat's plan mode button is a different thing: Kai writes the steps down and asks you to approve the plan before it starts, and then still asks for each change. Use it when you want to read the plan first, not to save clicks.

If a step builds something other than what this page describes, say so in the same chat; it edits what it made. Nothing here is one-way.

All three paths connect to the same place, a read-only database Keboola keeps for this walk. None of it is secret:

FieldValue
Host namekebooladev.snowflakecomputing.com
Username, Password, Database, SchemaHELP_TUTORIAL
WarehouseDEV

Database connectors are configured like any other data source (integration setup). Open Kai Agent in the top bar and say what you want connected, not what your credentials are:

Prompt
Set up a Snowflake data source connector against our sample database and load the OPPORTUNITY,
ACCOUNT and USER tables into Storage.

Check: three new tables, and Kai names the bucket it put them in.

Three tables, in one bucket:

TableRows
OPPORTUNITY639
ACCOUNT275
USER28
  • The connection is refused. A typo in the host or the warehouse. All four of username, password, database and schema are the same word here, HELP_TUTORIAL, which is easy to read past. The UI has a Test Connection button for this; the CLI finds out when the job runs.
  • The job succeeds but a table is empty. The row is pointing at a table name that exists in a different schema. schema inside table is per row, not inherited from the connection.
  • You want the configuration back after deleting it. kbagent config delete moves it to the trash rather than destroying it, and prints the command that undoes it. The UI has the same trash, under Delete Configuration.
  • You need only new rows next time. That is incremental fetch, in Advanced Mode and in the row’s parameters. Database data sources covers it.
Ask Kai

Hi, I'm Kai — Keboola's AI assistant for the docs. Ask me anything and I'll answer from the documentation and cite the pages I use.

Kai is an AI and can make mistakes. Check the sources it links.