Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2024 05:06 AM
We have Databricks UniForm format (iceberg) tables are present in azure data lake storage (ADLS) which has already integrated with Databricks unity catalog. How to read Uniform format tables using Databricks as a query engine?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2024 05:17 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2024 06:45 PM
Query Using Unity Catalog:
- SQL:sqlCopiar códigoSELECT * FROM catalog_name.schema_name.table_name;
- PySpark:pythonCopiar códigodf = spark.sql("SELECT * FROM catalog_name.schema_name.table_name") df.display()
- SQL:
Direct Access by Path: If not using Unity Catalog:
pythonCopiar códigoiceberg_table_path = "abfss://<container>@<storage_account>.dfs.core.windows.net/<path_to_table>" df = spark.read.format("iceberg").load(iceberg_table_path) df.display()Optimize Performance:
- Query by partitions:sqlCopiar códigoSELECT * FROM catalog_name.schema_name.table_name WHERE partition_column = 'value';
- Cache data:pythonCopiar códigodf.cache()
- Query by partitions:
Optional Features:
- Time Travel:sqlCopiar códigoSELECT * FROM catalog_name.schema_name.table_name VERSION AS OF 123456;
- Time Travel:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 07:35 AM
Thank you very much!