You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "djouallah (via GitHub)" <gi...@apache.org> on 2024/11/18 20:24:54 UTC
[I] How to get rid of the warning [iceberg-python]
djouallah opened a new issue, #1336:
URL: https://github.com/apache/iceberg-python/issues/1336
### Question
using this code with pyiceberg 0.8
```
tbl = db+"."+"calendar"
if not catalog.table_exists(tbl):
df=duckdb.sql(""" SELECT cast(unnest(generate_series(cast ('2018-04-01' as date), cast('2024-12-31' as date), interval 1 day)) as date) as date,
EXTRACT(year from date) as year,
EXTRACT(month from date) as month
""").arrow()
catalog.create_table_if_not_exists(tbl,schema=df.schema)
catalog.load_table(tbl).overwrite(df)
print('calendar created')
else:
print("table exist already")
```
I am getting this warning, how I can remove it
```
/usr/local/lib/python3.10/dist-packages/pyiceberg/utils/deprecated.py:54: DeprecationWarning: Deprecated in 0.8.0, will be removed in 0.9.0. Table.identifier property is deprecated. Please use Table.name() function instead.
_deprecation_warning(deprecation_notice(deprecated_in, removed_in, help_message))
/usr/local/lib/python3.10/dist-packages/pyiceberg/utils/deprecated.py:54: DeprecationWarning: Deprecated in 0.8.0, will be removed in 0.9.0. Support for parsing catalog level identifier in Catalog identifiers is deprecated. Please refer to the table using only its namespace and its table name.
_deprecation_warning(deprecation_notice(deprecated_in, removed_in, help_message))
calendar created
```
--
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] How to get rid of the warning [iceberg-python]
Posted by "lk-1984 (via GitHub)" <gi...@apache.org>.
lk-1984 commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2696947134
@kevinjqliu I have Python 3.11.11 and Pyiceberg 0.8.1.
```
pyiceberg
/fooobar/.venv/lib/python3.11/site-packages/pyiceberg/utils/deprecated.py:35: DeprecationWarning: Call to DEFAULT_MIN_SNAPSHOTS_TO_KEEP, deprecated in 0.8.0, will be removed in 0.9.0. DEFAULT_MIN_SNAPSHOTS_TO_KEEP is deprecated. Use TableProperties.MIN_SNAPSHOTS_TO_KEEP_DEFAULT instead..
_deprecation_warning(message)
/fooobar/.venv/lib/python3.11/site-packages/pyiceberg/utils/deprecated.py:35: DeprecationWarning: Call to DEFAULT_MAX_SNAPSHOT_AGE_MS, deprecated in 0.8.0, will be removed in 0.9.0. DEFAULT_MAX_SNAPSHOT_AGE_MS is deprecated. Use TableProperties.MAX_SNAPSHOT_AGE_MS_DEFAULT instead..
_deprecation_warning(message)
Usage: pyiceberg [OPTIONS] COMMAND [ARGS]...
Options:
--catalog TEXT
--verbose BOOLEAN
--output [text|json]
--ugi TEXT
--uri TEXT
--credential TEXT
--help Show this message and exit.
Commands:
create Operation to create a namespace.
describe Describe a namespace or a table.
drop Operations to drop a namespace or table.
files List all the files of the table.
list List tables or namespaces.
list-refs List all the refs in the provided table.
location Return the location of the table.
properties Properties on tables/namespaces.
rename Rename a table.
schema Get the schema of the table.
spec Return the partition spec of the table.
uuid Return the UUID of the table.
version Print pyiceberg version.```
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu closed issue #1336: How to get rid of the warning
URL: https://github.com/apache/iceberg-python/issues/1336
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2486727124
Thanks for reporting this! This is a bug where the warning is emitted when the catalog identifier is not used.
--
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] How to get rid of the warning [iceberg-python]
Posted by "lk-1984 (via GitHub)" <gi...@apache.org>.
lk-1984 commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2698443830
> yes those warning lines are removed in the new 0.9.0 release If you are still using 0.8.x, you can manually suppress those warnings https://docs.python.org/3/library/warnings.html
Nope, 0.9.0 is fine for me, and it does not have the warning, thanks!
So much more fun without JVM!
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2487470684
Opened #1346 as a fix
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2489514017
Merged #1346, will try to get 0.8.1 out ASAP with this fix
--
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] How to get rid of the warning [iceberg-python]
Posted by "lk-1984 (via GitHub)" <gi...@apache.org>.
lk-1984 commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2695027565
@kevinjqliu So this did not get into 0.8.1?
--
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] How to get rid of the warning [iceberg-python]
Posted by "djouallah (via GitHub)" <gi...@apache.org>.
djouallah commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2487131390
polaris
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2698011755
yes those warning lines are removed in the new 0.9.0 release
If you are still using 0.8.x, you can manually suppress those warnings https://docs.python.org/3/library/warnings.html
--
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] How to get rid of the warning [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2486954482
Looping in @sungwy here, did you mean to return `self._identifier` here?
https://github.com/apache/iceberg-python/blob/a90c0140ee7b6c3a9d553c7317a98b8f9582d7d9/pyiceberg/table/__init__.py#L798-L804
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2695842177
@lk-1984 it was cherry-picked and released as part of 0.8.1 https://github.com/apache/iceberg-python/compare/main...pyiceberg-0.8.x
commit id f8cb1c0d75c5ec0d9b479446eaa11d2180357ff4
--
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] How to get rid of the warning [iceberg-python]
Posted by "sungwy (via GitHub)" <gi...@apache.org>.
sungwy commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2487112440
Hi @Fokko, @djouallah thanks for flagging this! I think I must have missed out on updating the `name` method in this large deprecation exercise: https://github.com/apache/iceberg-python/pull/994/files#diff-23e8153e0fd497a9212215bd2067068f3b56fa071770c7ef326db3d3d03cee9bR1441-R1443
It also looks like `.name()` method is only called within the Table class's `__eq__` method, so it's not obvious to me where in @djouallah function calls this method is being called. A follow up question on my side to help with the root cause investigation @djouallah - what catalog type are you using in your example above?
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2487444598
The first warning, `Table.identifier property is deprecated. Please use Table.name() function instead.` is from the use of `Table.identifier` used by the pyiceberg codebase.
See https://grep.app/search?q=.identifier&words=true&filter[repo][0]=apache/iceberg-python
The second warning, `Support for parsing catalog level identifier in Catalog identifiers is deprecated.`, is addressed by #1326
--
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] How to get rid of the warning [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1336:
URL: https://github.com/apache/iceberg-python/issues/1336#issuecomment-2486727584
Possibly related to #1318, but i'll double check
--
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