Import tables

Importing brings a source table into the Lake, where you can deploy it and load it. Use the source panel to tick tables, use Excel for a long list, or write your own SQL query as a custom table. To connect a datasource first, see Supported connectors.

Open the source panel

  1. In Lake, right-click a datasource, database or schema row and choose View Source, or select the row and click View Source in the toolbar.
  2. If a datasource has no tables in the Lake yet, use the Import tables link on its row. It opens the same panel without selecting the row.

The panel opens beside the tree, doubles the width of the tree panel, and shows the datasource it works on in a strip at its top.

View Source is offered for a ready datasource, or for a database or schema inside one. The toolbar button is greyed out when nothing suitable is selected, when another kind of row is selected, and while batch select is on, where hovering it shows Disabled in batch select mode.

Import tables from the panel

  1. Expand the databases and schemas, or click Search and type a name.
  2. Tick the tables you want. Tick a database or schema to import everything under it.
  3. Click Check all to tick everything in the panel, or Uncheck all to clear it.
  4. To look at a table's data first, hover over its row and click Preview. The preview shows up to 100 rows, or up to 500 for a SQL database or Snowflake.
  5. Click Import in the panel's toolbar. The number beside it counts your selection; hovering Import shows the breakdown of databases, schemas and tables.
  6. Wait for the Import completed successfully. message. The panel closes, and the tree scrolls to the datasource and highlights it.

While the import runs, the panel is locked: you cannot close it, and its close button explains Please wait for the import to complete.

How ticking works:

The count is read from what the panel has loaded, so it can be lower than you expect: a collapsed database counts as one item until you expand it, and a schema you ticked counts alongside its tables. Expand the branches you care about before you import.

What gets imported:

The panel replaces the tree with a message when there is nothing to do:

MessageWhat it means
No tables availableThe source has no tables to import from.
All tables already importedEvery table from this source is already in the Lake.
All tables deployedEvery available table has already been deployed.
Deployment in progressThe datasource's tables are being deployed. Wait for it to finish.

If the panel cannot read the source, it reads Failed to load source menu with Retry. Check the connection, then retry. For other messages, see Lake troubleshooting.

Search inside the panel

  1. Click Search to open the box, marked Search.... Click Close search or press Escape to close it.
  2. Type at least two characters. The search starts after a short pause.
  3. Tick items straight from the results, exactly as in the tree. Load more appears while more results exist.

While the search runs, the panel reads Searching for "...". A counter shows how many matches were found; while more pages exist it adds shown, more available. The search is case-insensitive, and it never lists a table that is already in the Lake.

Messages you can meet:

Import a list from Excel

  1. Open the source panel for the datasource.
  2. Click Export the table list to Excel. The file is named after the datasource and ends in _tables.xlsx. It has one sheet, Tables, with the columns Database, Schema and Table, and it lists only tables that are not yet imported.
  3. Open the file and delete the rows you do not want. Keep the header row.
  4. In the panel, click Import tables from an edited Excel file. Choose a .xlsx or .xls file.
  5. Read the Review Excel import window. Check the counts and the Rows needing attention list.
  6. Click Import N table(s), where N is the number shown in Will import.

Reading the file changes nothing; the import starts only when you click Import.

The review window shows four counts:

CountWhat it counts
Will importTables that will be imported.
SkippedRows that will not be imported. Each row shows a reason.
CorrectedRows matched after ignoring letter case. They are imported under the source's exact name.
Rows readData rows in the file.

A skipped row has one of these reasons:

ReasonWhat it means
Not foundNo table with this name exists in the source. Check the spelling, or export the list again.
Already importedThe table is already in the Lake. It is left untouched.
AmbiguousSeveral source tables match this name once letter case is ignored. Copy the exact name.
DuplicateThe same table appears earlier in the file. Only the first row is imported.
IncompleteDatabase, Schema and Table must all be filled in.

Excel import limits:

Tip

For more than 50 tables in one schema, import in batches. Export the list again after each batch. Tables already imported no longer appear in it.

Add a custom table

A custom table is a Lake table defined by your own SQL query. You can add one to a SQL database or a Snowflake datasource only.

  1. In Lake, right-click the datasource, database or schema, then choose Add New.
  2. In Table Location, choose a Database and a Schema, then type a Table Name. If you started from a database or schema, its names are filled in and cannot be changed. A name cannot contain double quotes.
  3. In SQL Query, write your query.
  4. Click Run Query. When the query succeeds, the status reads Query validated and the result opens in a window.
  5. Click Create.

Run Query stays greyed out until the database, schema, table name and query are filled in. Create stays greyed out until the query has run successfully. If the query returns no rows, it cannot be validated: No data returned from the query, cannot validate. Changing the database or the query after a run clears the validation, so run it again. If the name already exists in the chosen schema, the popup warns A table with this name already exists in the selected schema.

The columns a custom query returns are created as text columns. Open the table afterwards to set its primary key, columns and sync, and to deploy it. To change the query later, open its General step and choose Edit SQL. See Configure a table.

What imported tables start with

SettingWhat it doesDefault
Sync TypeHow the table loads each time.Full Reload (Truncate Insert)
SynchronizeWhether this table's load is included in its workflow.On
Synchronize DaysHow many days back an incremental load reaches. Shown only for incremental sync types.10

A table is created under a name built from the datasource code, the database, the schema and the table name, so tables from different sources stay apart. The tree keeps showing the table's name in the source as the row label.

The Lake's own audit columns, such as security labels, snapshot from/to values and the load timestamp, are never imported from the source.

A freshly imported table is not deployed yet, so deploy it before the Lake can query it. Deploying needs at least one primary key column. To change these settings and deploy, see Configure a table. To pick a sync type, see Choose a sync type.

Who can import

ActionPermission
Import tables from the panel, from an Excel file, or add a custom tableAdd/Modify Lake Objects
Export the table list to ExcelView Lake Objects

An import of a whole database or schema structure passes the permission and object checks before it runs. Without Add/Modify Lake Objects, the import is refused. For the full list of Lake permissions, see Who can do what in the Lake.

Questions, answered

Why can't I use View Source?

The toolbar button needs a ready datasource, database or schema selected. It is greyed out when nothing suitable is selected, when another kind of row is selected, and while batch select is on. A datasource that is not ready does not offer the source panel; check its state in The Lake tree.

Why is a table missing from the source panel?

Tables already in the Lake are never listed, and a database or schema whose tables are all imported disappears from the panel. System schemas are hidden too. If the table is new in the source, close and reopen the panel so it reads the structure again.

Why is the Import count lower than the number of tables I ticked?

The count works from what the panel has loaded. A collapsed database or schema counts as one item until you expand it, and a schema you ticked counts alongside its tables. Expand the branches you care about, and point at Import to read the breakdown.

I need 300 tables from one schema. What do I do?

Export the list to Excel and import it in batches of up to 50 tables per schema. Export the list again after each batch, because tables already imported no longer appear in it.

Why does the search say a database couldn't be searched?

One or more databases did not answer in time. The results shown are still valid, but the search may be incomplete. Hover the note to see the database and its reason, then run the search again to retry it.

Why does my search find nothing?

The search starts at two characters, looks only at tables that are not in the Lake yet, and stays inside the datasource you opened the panel for. Check the spelling, and remember that a table you already imported will never appear. If a page of results expires, the panel says Invalid search cursor: run the search again.

Why was a row marked Already imported in my Excel file?

The table is already in the Lake, so it was left untouched. Export a fresh list and use the names it gives you.

What does Corrected mean in the Excel review?

The row matched a source table after letter case was ignored. The table is imported under the source's exact name, and the row notes the name it was corrected to. You do not need to do anything.

Why can't I click Import in the review window?

The window lets you confirm only when at least one row resolves to a table that will be imported. If the blocked note appears, nothing in the file matched, so fix the skipped rows or export a fresh sheet. Reading the file changes nothing until you confirm.

Why can't I add a custom table to my MongoDB datasource?

Custom tables are available only for SQL databases and Snowflake. For other datasource types, use View Source to import their tables.

Why can't I create my custom table yet?

Create stays greyed out until the query has run successfully. Fill in the database, schema, name and query, click Run Query, and fix anything it reports, for example No data returned from the query, cannot validate when the query returns no rows. If you change the database or the query afterwards, run it again. The name cannot contain double quotes.

Why can't I query the table I just imported?

A freshly imported table is not deployed yet, and only deployed tables can be queried. Deploy it first; deploying needs at least one primary key column. See Configure a table.