Comments (6)
We probably need to see the ibis expression. Column names that look like that should effectively never make it into bigquery.
Can you give a reproducible example that only uses Ibis? We definitely need to see what Ibis APIs you're using to produce this error.
from ibis.
Rewrite the problem description with an easy example
from ibis.
Updated the error message*******
400 POST https://bigquery.googleapis.com/upload/bigquery/v2/projects/voltrondata-demo/jobs?uploadType=multipart: Invalid field name "Cast(y, int64)_ef9a46". Fields must contain the allowed characters, and be at most 300 characters long. For allowed characters, please refer to https://cloud.google.com/bigquery/docs/schemas#column_names
seems like Cast(y, int64)_ef9a46
is not a valid name for bigquery, because have letters after number.
from ibis.
are you running against main
? That looks like the bigquery issues I fixed yesterday in #9141 and #9149
from ibis.
oh, no. Let me pull it from main
are you running against main? That looks like the bigquery issues I fixed yesterday in #9141 and #9149
from ibis.
we convert an intermediate table into a memtable
in bis-ml, see link
The intermediate information in the expression tree got lost, unfortunately, the new name "Cast(y, float64)"
is not a valid bigquery column name.
I think it is not an ibis issue, we could fix this in ibisml.
Here is the simplified code to reproduce the error:
import ibis
ibis.options.interactive = True
con = ibis.bigquery.connect(project_id="xx", dataset_id="xx")
t = ibis.memtable({
"x": ["a", "b"],
"y": ["0", "1"]
})
con.create_table(
"t", t.to_pyarrow(), overwrite=True
)
t = con.table("t")
base_table = t.drop("y")
target_table = t.y.cast(dt.float64)
y_m = ibis.memtable(target_table.as_table().to_pyarrow())
y_m = y_m.mutate(x=ibis.literal("a"))
base_table.join(y_m, "x")
And the new name "Cast(y, float64)"
is not a valid name in bigquery.
ibis.to_sql(y_m)
sql
SELECT
"t0"."Cast(y, float64)",
'a' AS "x"
FROM "ibis_pyarrow_memtable_cimh6vdzlvhyxlddji3g6jvugq" AS "t0"
from ibis.
Related Issues (20)
- bug After a chain join, executing mutate will cause an error. HOT 7
- feat(pyspark): manage streaming queries HOT 1
- bug: `add_operation` attempts to call into removed `translator_class` HOT 3
- feat(polars): support `to_torch` HOT 2
- bug: `.sql()` sometimes execute the query in order to get the schema HOT 1
- feat: Add database to read_ HOT 3
- bug: april fools day ibish import failing on mac osx m1 HOT 5
- feat(api): Add `order_by` parameter to the `collect()` method HOT 3
- Postgres error: DateDelta HOT 2
- feat(pyspark): support udaf
- bug HOT 1
- bug: Oracle Table alias HOT 8
- bug: Installation issue: mamba on Windows 10 HOT 6
- feat: Table.to_records()
- feat: `backend.db_params`
- `collect` does not respect order HOT 2
- bug Error when connecting to Trino after upgrading to 9.0.0
- bug: table formatting characters don't render monospace with some fonts HOT 5
- bug: `read_parquet` and similar methods silently overwrite tables HOT 2
- bug: names_sort argument in table.pivot_wider has no effect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ibis.