You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromyoyoimportYoYo# Initialise a cache object modelcache=YoYo(
schema="custom_schema"# optional : default = "store"cache_dir="cache-data"# optional : default = "tmp"
)
# Get a connection to the cacheconn=cache.connect()
# Query the cacheconn.execute("SELECT * FROM store.perfect_data LIMIT 1000;").pl() # returns Polars DataFrame# Get the information schemacache.info()
# Check if a table name exists in the cache (True / False)cache.check(table="api_data_2024_02")
# List all tables in the cache cache.list_all_tables() # without schema informationcache.list_schema_tables() # with schema information# Create / update a table in the cache with DuckDB readable in-memory datacache.update(
table="post_delta_query",
source="api_data",
)
# Backup the cache to cache directory cache.backup(
cache_dir="cache/custom-dir"# optional : default = "tmp/backup"
)
# Remove the cache backup filescache.erase_backup()
# Remove the cache filecache.erase()
# Clear items from the cachecache.clear(schema="custom-schema", table="special-table") # specific schema tablecache.clear(schema="custom-schema") # entire schemacache.clear(table="special-table") # specific table table in default schema ("store")