❯ python -m venv venv-012
❯ source venv-012/bin/activate
❯ pip install "openmetadata-ingestion[snowflake,mysql,bigquery]~=0.12.3"
# Pin SQLAlchemy to 1.4 for old release without requirement fix
❯ pip install SQLAlchemy~=1.4
❯ metadata --version
metadata, version metadata 0.12.3.0 from /Users/pmbrull/tests/0123-0131-upgrade/venv-012/lib/python3.9 (python 3.9)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE ingestion_pipeline_entity | |
| SET json = jsonb_set( | |
| json::jsonb #- '{sourceConfig,config,viewParsingTimeoutLimit}', | |
| '{sourceConfig,config,queryParsingTimeoutLimit}', | |
| (json #> '{sourceConfig,config,viewParsingTimeoutLimit}')::jsonb, | |
| true | |
| ) | |
| WHERE json #>> '{pipelineType}' = 'metadata' | |
| AND json #>> '{sourceConfig,config,type}' = 'DatabaseMetadata'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apache-airflow==2.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my_list = [1, 2, 3] | |
| hex(id(my_list)) # 0x104d7a580 | |
| my_list.append(4) # mutate the list | |
| hex(id(my_list)) # 0x104d7a580 -> still the same object. | |
| my_string = "Levy" | |
| hex(id(my_string)) # 0x104dec760 | |
| my_string += " the cat" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data = {"cat": "Lévy", 2: "hello"} | |
| data["cat"] # Lévy | |
| data[2] # hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if password and get_funds() > 0: | |
| make_transaction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The first argument is True | |
| coffee = 10 | |
| milk = None | |
| coffee or milk # 10, milk is not evaluated | |
| coffee and milk # None, both expressions are evaluated | |
| # The first argument is False | |
| coffee = None | |
| milk = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Coffee: | |
| def __init__(self, total_amount): | |
| self.total_amount = total_amount | |
| def drink(self, amount): | |
| if amount > self.total_amount: | |
| raise ValueError("Not enough coffee!") | |
| self.total_amount -= amount | |
| def __bool__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| count = 0 | |
| if not count: # Handles 0 and None | |
| ... | |
| if count is None: # Only handles None | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| help(int) | |
| [...] | |
| | __bool__(self, /) | |
| | self != 0 | |
| [...] | |
| help(str) |
NewerOlder