Comments (3)
Using even the simplest of loading doesn't seem to work
def testapi():
df = pd.DataFrame(
{
"my_string": ["a", "b", "c"],
"my_int64": [1, 2, 3],
"my_float64": [4.0, 5.0, 6.0],
"my_bool1": [True, False, True],
"my_bool2": [False, True, False]
}
)
to_gbq(df, 'test_dataset.test_table', project_id='gcp-cap-dsml-core-dev')
Testing the above with bigquery emulator results in error
GenericGBQException("Reason: {0}".format(ex)) from ex
pandas_gbq.exceptions.GenericGBQException: Reason: 400 POST http://localhost:9050/bigquery/v2/projects/local-project/jobs?prettyPrint=false: unspecified job configuration query
from bigquery-emulator.
It looks like the jobs insert handler currently only handles query jobs, import from GCS, and extract to GCS jobs:
https://github.com/goccy/bigquery-emulator/blob/main/server/handler.go#L1372-L1391
to_gbq
uses the BigQueryClient.load_table_from_dataframe
method which POSTs a CSV / Parquet file to the API.
In our project, we use google_cloud.bigquery.Client.insert_rows
to populate tables.
from bigquery-emulator.
Ah, got it. Any plans to incorporate BigQueryClient.load_table_from_dataframe
function in the future? For now, I will look for some workaround
from bigquery-emulator.
Related Issues (20)
- JSON_EXTRACT_SCALAR nor JSON_QUERY does not work as expected HOT 1
- Connection error when creating a dataset HOT 8
- Error when executing bq command from google-cloud-cli version 469.0.0
- Response from table update is incompatible with Google's Python SDK HOT 1
- Improve emulator performance for large projects HOT 7
- Failes to exec merge statement UPDATE
- Cannot create a view with a query that ends in semicolon
- Cannot materialize job results when table does not yet exist
- [Golang] Errors from zetasql parser HOT 3
- The BigQuery emulator doesn't support CREATE TABLE AS SELECT with column definition list HOT 2
- Error querying a nested struct using UNNEST HOT 1
- Support of UNPIVOT operator HOT 3
- `UPDATE ... FROM ( SELECT ... )` results in the error: `Update with joins not supported`
- Unable to use UploadCsvAsync HOT 1
- Error checking null string parameter in where clause HOT 1
- BQ-Emulator does not release memory when deleting tables
- Python SDK always retries requests for invalid queries
- Ingestion-time partitioning not (fully) supported HOT 1
- Support for the `bqutil` community user-defined functions
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 bigquery-emulator.