-
Notifications
You must be signed in to change notification settings - Fork 609
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
bug: BigQuery Create table with partition_by argument is not working #10022
Comments
It looks like we're not handling the single partition case here. Can you try putting the partition expression in a Long term, we'll continue to support strings here, so the current implementation probably doesn't need to be adjusted except to handle the single-string input case. We could perhaps discuss supporting deferreds here. |
i tried to pass in as a list, also getting error, looks like this feature is not working. |
Ok, yeah, this looks like something isn't getting formatted properly (I think) -- because this works to create an empty table: [nav] In [6]: con.raw_sql(f"""CREATE TABLE
...: {con.dataset}.newtable (transaction_id INT64, transaction_date DATE)
...: PARTITION BY
...: DATE_TRUNC(transaction_date, MONTH)""")
Out[6]: <google.cloud.bigquery.table._EmptyRowIterator at 0x78220076a9b0> |
Ok, this fails because we call CREATE TABLE `ibis-gbq`.`_92ff9aec474dffb9d08ce7a2d670d6e934152e1b`.`hi` (`c1` DATE, `c2` INT64) PARTITION BY (`DATE_TRUNC(c1, MONTH)`) The above would work if we didn't have the function quoted, but unclear to me how we want to handle denoting which arguments to |
I haven't started working on this yet, but I should be able to get to it for the next release (10.0). |
I realized pass in list works indeed. conn.create_table("name", table, partition_by=["refresh_date"]) But may not work with function like |
Yep, the thing that doesn't work (reported in the OP) is passing a more complex expression for partitioning. |
What happened?
I am trying to use the BigQuery backend to create a table with a partition by expression, ibis is raising exception.
here is a simple code to reproduce the error:
What version of ibis are you using?
9.4.0
What backend(s) are you using, if any?
BigQuery
Relevant log output
The text was updated successfully, but these errors were encountered: