Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress bar does not work #199

Open
e-kotov opened this issue Jul 18, 2024 · 4 comments
Open

progress bar does not work #199

e-kotov opened this issue Jul 18, 2024 · 4 comments
Labels
feature a feature request or enhancement help wanted ❤️ we'd love your help!

Comments

@e-kotov
Copy link

e-kotov commented Jul 18, 2024

When enabling progress bar configuration option + enable_progress_bar_print, R does not show progress bar. Python version of duckdb client does show the progress. Below is code for both R and Python where I make sure the progress bar is enabled, but it only has visible effect in Python, not in R.

R

library(duckdb)

con <- dbConnect(duckdb::duckdb())

dbExecute(con, "INSTALL spatial;")
dbExecute(con, "LOAD spatial;")
dbExecute(con, "INSTALL httpfs;")
dbExecute(con, "LOAD httpfs;")
dbExecute(con, "SET s3_region='us-west-2';")

dbSendQuery(con, "SET enable_progress_bar = true;")
dbSendQuery(con, "SET enable_progress_bar_print = true;")
dbGetQuery(con, "SELECT current_setting('enable_progress_bar');")
dbGetQuery(con, "SELECT current_setting('enable_progress_bar_print');")

query <- "
SELECT
  id,
  names.primary as primary_name,
  height,
  ST_GeomFromWKB(geometry) as geometry
FROM read_parquet('s3://overturemaps-us-west-2/release/2024-06-13-beta.1/theme=buildings/type=*/*', filename=TRUE, hive_partitioning=1)
WHERE primary_name IS NOT NULL
AND bbox.xmin > -83.00
AND bbox.xmax < -83.36
AND bbox.ymin > 43.00
AND bbox.ymax < 43.33;
"

x <- dbGetQuery(con, query)

dbDisconnect(con, shutdown = TRUE)

Python

import duckdb

con = duckdb.connect()

con.execute("INSTALL spatial;")
con.execute("LOAD spatial;")
con.execute("INSTALL httpfs;")
con.execute("LOAD httpfs;")
con.execute("SET s3_region='us-west-2';")

con.execute("SET enable_progress_bar = true;")
con.execute("SET enable_progress_bar_print = true;")
print(con.execute("SELECT current_setting('enable_progress_bar');").fetchall())
print(con.execute("SELECT current_setting('enable_progress_bar_print');").fetchall())

query = """
SELECT
  id,
  names.primary as primary_name,
  height,
  ST_GeomFromWKB(geometry) as geometry
FROM read_parquet('s3://overturemaps-us-west-2/release/2024-06-13-beta.1/theme=buildings/type=*/*', filename=TRUE, hive_partitioning=1)
WHERE primary_name IS NOT NULL
AND bbox.xmin > -83.00
AND bbox.xmax < -83.36
AND bbox.ymin > 43.00
AND bbox.ymax < 43.33;
"""

x = con.execute(query).fetchall()

con.close()
@Robinlovelace
Copy link

👍 to this, would help our workflows.

@krlmlr
Copy link
Collaborator

krlmlr commented Aug 16, 2024

There's a display_create_func we could use to display the progress bar from R.

@krlmlr krlmlr added feature a feature request or enhancement help wanted ❤️ we'd love your help! labels Aug 16, 2024
@krlmlr
Copy link
Collaborator

krlmlr commented Oct 23, 2024

Also: enable_progress_bar, print_progress_bar, wait_time .

@meztez
Copy link

meztez commented Jan 5, 2025

#951 Will check if this could be the start of something kinda working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

4 participants