You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "FANNG1 (via GitHub)" <gi...@apache.org> on 2024/10/29 13:07:21 UTC

[I] INIT_CATALOG_TABLES_PROPERTY property doesn't take effect if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database. [iceberg]

FANNG1 opened a new issue, #11423:
URL: https://github.com/apache/iceberg/issues/11423

   ### Apache Iceberg version
   
   1.6.1 (latest release)
   
   ### Query engine
   
   Other
   
   ### Please describe the bug 🐞
   
   If I setup a Jdbc catalog with MYSQL URI like `jdbc:mysql://127.0.0.1:3307/db1`, it works fines. but when I create another jdbc catalog with different database like `jdbc:mysql://127.0.0.1:3307/db2`, the query was failed because Iceberg metadata table is not setup in db2.  `INIT_CATALOG_TABLES_PROPERTY` are both enabled.
   
   environment:
   1. MYSQL server: 5.7.44
   2. MYSQL JDBC driver:  mysql-connector-java-8.0.15.jar
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [X] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Iceberg metadata table is not created if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11423:
URL: https://github.com/apache/iceberg/issues/11423#issuecomment-2837085597

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Iceberg metadata table is not created if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11423:
URL: https://github.com/apache/iceberg/issues/11423#issuecomment-2874627974

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Iceberg metadata table is not created if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #11423: Iceberg metadata table is not created if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database.
URL: https://github.com/apache/iceberg/issues/11423


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] INIT_CATALOG_TABLES_PROPERTY property doesn't take effect if using MYSQL JDBC catalog and there are existing iceberg meta tables in another database. [iceberg]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on issue #11423:
URL: https://github.com/apache/iceberg/issues/11423#issuecomment-2446151368

   The main problem is we may get table object from other databases for MYSQL, PG works well, and not sure whether other RMDB works well.  
   
   ```java
               DatabaseMetaData dbMeta = conn.getMetaData();
               ResultSet tableExists =
                   dbMeta.getTables(
                       null /* catalog name */,
                       null /* schemaPattern */,
                       JdbcUtil.CATALOG_TABLE_VIEW_NAME /* tableNamePattern */,
                       null /* types */);
               if (tableExists.next()) {
                 return true;
               }
   ```
   
   There may be two options:
   1. passing database information when get table from connection
   2. not check the existing of the table , use `CREATE TABLE IF NOT EXISTS` to create table directly.
   
   I prefer to use Option2 for it's simple and more extensible for other RDMS


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org