- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2021 12:43 AM
you have 2 types of tables: managed and unmanaged. the managed ones store their data on the databricks storage account.
The unmanaged ones store the data somewhere else, your own data lake f.e.
If you use managed tables, the storage is already mounted, for unmanaged tables you have to mount the storage first.
https://docs.databricks.com/data/tables.html#managed-and-unmanaged-tables
Next you can create a table. Here you have the option to manually define the schema of the table, or to derive this schema automatically.
For the second option, it depends on the file type how this works. If your source file is parquet, delta lake automatically has the schema, for csv you can set inferschema to True.
https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html
It is not hard to do, but you need to read a few pages of docs indeed.