import Tabs from ‘@theme/Tabs’; import TabItem from ‘@theme/TabItem’;
This document walks through the steps to register a Onetable synced Iceberg table in BigLake Metastore on GCP.
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_key.json
utilities-0.1.0-SNAPSHOT-bundled.jar by following the steps on the Installation page:::danger Important: Currently BigLake Metastore is only accessible through Google's BigLake Rest APIs, and as such Onetable requires you to setup the below items prior to running sync on your source dataset.
Use the Try this method on Google's REST reference docs for projects.locations.catalogs.create method to create a catalog.
In this tutorial we'll use us-west1 region.
projects/<yourProjectName>/locations/us-west1/catalogs
onetable
Use the Try this method on Google's REST reference docs for projects.locations.catalogs.databases.create method to create a database.
projects/<yourProjectName>/locations/us-west1/catalogs/onetable/databases
onetable_synced_db
:::danger Limitation: The current implementation of Onetable requires you to set the below options in the Java object.
catalogImplcatalogNamegcp_projectgcp_locationwarehouseThen proceed to creating the utilities-0.1.0-SNAPSHOT-bundled.jar by following the steps here. :::
:::tip The improvement to let users pass these options through the my_config.yaml is being tracked under this github issue. :::
<Tabs groupId=“table-format” defaultValue=“hudi” values={[ { label: ‘sourceFormat: HUDI’, value: ‘hudi’, }, { label: ‘sourceFormat: DELTA’, value: ‘delta’, }, ]}
sourceFormat: HUDI targetFormats: - ICEBERG datasets: - tableBasePath: gs://path/to/source/data tableName: table_name partitionSpec: partitionpath:VALUE
sourceFormat: DELTA targetFormats: - ICEBERG datasets: - tableBasePath: gs://path/to/source/data tableName: table_name partitionSpec: partitionpath:VALUE
:::danger Note: Replace with appropriate values for tableBasePath and tableName fields. :::
From your terminal under the cloned Onetable directory, run the sync process using the below command.
java -jar utilities/target/utilities-0.1.0-SNAPSHOT-bundled.jar -datasetConfig my_config.yaml
:::tip Note: At this point, if you check your bucket path, you will be able to see the metadata directory with metadata files which contains the information that helps query engines to interpret the data as an Iceberg table. :::
Once the sync succeeds, Onetable would have written the table directly to BigLake Metastore. We can use Try this method option on Google's REST reference docs for projects.locations.catalogs.databases.tables.get method to view the created table.
projects/<yourProjectName>/locations/us-west1/catalogs/onetable/databases/onetable_synced_db/tables/table_name
In this guide we saw how to,
projects.locations.catalogs.databases.tables.get method