The Tables class provides CRUD operations for database table metadata, plus table-specific helpers for tagging, column descriptions, custom metrics, and sample data.FQN format:service_name.database_name.schema_name.table_name
from metadata.generated.schema.api.tests.createCustomMetric import CreateCustomMetricRequestTables.add_custom_metric( "table-uuid", custom_metric=CreateCustomMetricRequest( name="revenue_sum", expression="SUM(total)", description="Total revenue across all orders", columnName="total", ),)
# Export table definitions to CSVcsv_content = Tables.export_csv("my_service.my_db.public").execute()# Import table definitions from CSVTables.import_csv("my_service.my_db.public").with_data(csv_content).execute()# Dry run to preview import without committingTables.import_csv("my_service.my_db.public").with_data(csv_content).set_dry_run(True).execute()