World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#11342] web-v2(UI): glue catalog table follow up issue (#11485)
Qian Xiaff37e382eb3f
diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js b/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.jsindex 2ddffa92cc..94fc9fb327 100644--- a/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js+++ b/web-v2/web/src/app/catalogs/rightContent/CreateSchemaDialog.js@@ -265,7 +265,16 @@ export default function CreateSchemaDialog({ ...props }) {rules={[{ required: true },{ type: 'string', max: 64 },- { pattern: isIcebergJdbcCatalog ? dynamicSchemaNameRegex : new RegExp(nameRegex) }+ { pattern: isIcebergJdbcCatalog ? dynamicSchemaNameRegex : new RegExp(nameRegex) },+ {+ validator: (_, value) => {+ if (!isGlueProvider || !value || !value.includes('-')) {+ return Promise.resolve()+ }++ return Promise.reject(new Error('Glue schema name does not support hyphen (-).'))+ }+ }]}messageVariables={{ label: 'schema name' }}>diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.jsindex 99150c7f34..30bc3d72f3 100644--- a/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js+++ b/web-v2/web/src/app/catalogs/rightContent/CreateTableDialog.js@@ -137,6 +137,27 @@ export default function CreateTableDialog({ ...props }) {const isSupportDefaultValue = defaultValueSupported.includes(provider)const dispatch = useAppDispatch()+ const getActiveTableDefaultProps = () => {+ const props = tableDefaultProps[provider] || []+ if (provider !== 'glue') {+ return props+ }++ const tableFormat = values?.['table-format']?.toLowerCase()++ return props.filter(prop => {+ if (!prop.hide?.length) {+ return true+ }++ if (!tableFormat) {+ return false+ }++ return !prop.hide.map(item => item.toLowerCase()).includes(tableFormat)+ })+ }+useResetFormOnCloseModal({form,open@@ -749,8 +770,9 @@ export default function CreateTableDialog({ ...props }) {submitData.columns.forEach(col => {delete col.uniqueId})- if (tableDefaultProps[provider]) {- tableDefaultProps[provider].forEach(item => {+ const activeDefaultProps = getActiveTableDefaultProps()+ if (activeDefaultProps.length) {+ activeDefaultProps.forEach(item => {if (values[item.key]) {submitData.properties[item.key] = values[item.key]}@@ -1570,7 +1592,7 @@ export default function CreateTableDialog({ ...props }) {<div className='flex flex-col gap-2'>{!editTable &&tableDefaultProps[provider] &&- tableDefaultProps[provider].map((prop, idx) => {+ getActiveTableDefaultProps().map((prop, idx) => {const isLocationRequired =prop.key === 'location' &&provider === 'lakehouse-generic' &&diff --git a/web-v2/web/src/config/catalog.js b/web-v2/web/src/config/catalog.jsindex 76d3d6b02c..2fcf072a57 100644--- a/web-v2/web/src/config/catalog.js+++ b/web-v2/web/src/config/catalog.js@@ -139,6 +139,11 @@ export const tableDefaultProps = {}],glue: [+ {+ key: 'location',+ defaultValue: '',+ description: 'Table storage location, e.g. s3://my-bucket/path'+ },{key: 'table-format',defaultValue: '',@@ -148,16 +153,19 @@ export const tableDefaultProps = {{key: 'metadata_location',defaultValue: '',+ hide: ['hive'],description: 'Iceberg metadata file path'},{key: 'format',- defaultValue: '',+ defaultValue: 'PARQUET',+ hide: ['iceberg'],select: ['TEXTFILE', 'SEQUENCEFILE', 'RCFILE', 'ORC', 'PARQUET', 'AVRO', 'JSON', 'CSV', 'REGEX']},{key: 'input-format',- defaultValue: 'org.apache.hadoop.mapred.TextInputFormat',+ defaultValue: 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat',+ hide: ['iceberg'],defaultValueOptions: {TEXTFILE: 'org.apache.hadoop.mapred.TextInputFormat',SEQUENCEFILE: 'org.apache.hadoop.mapred.SequenceFileInputFormat',@@ -172,7 +180,8 @@ export const tableDefaultProps = {},{key: 'output-format',- defaultValue: 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat',+ defaultValue: 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat',+ hide: ['iceberg'],defaultValueOptions: {TEXTFILE: 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat',SEQUENCEFILE: 'org.apache.hadoop.mapred.SequenceFileOutputFormat',@@ -187,7 +196,8 @@ export const tableDefaultProps = {},{key: 'serde-lib',- defaultValue: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',+ defaultValue: 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe',+ hide: ['iceberg'],defaultValueOptions: {TEXTFILE: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',SEQUENCEFILE: 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe',