-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
bugSomething isn't workingSomething isn't workingneeds triageAwaiting triage by a dask-sql maintainerAwaiting triage by a dask-sql maintainer
Description
Hello
I start to use dask- sql but I cant make any simple query, I can just make a total selection with select * from df;
. Beside this query I cant do anything else, in every query I get the samme error: SchemaError
.
Like the following example:
import pandas as pd
import dask.dataframe as dd
from dask_sql import Context
# Crear un pandas DF
test = {"Nombre":["Orlando", "Fernando", "Rosario", "Cuah", "Verónica"],
"Sexo":["M", "M","F","M","F"],
"Edad":[30,40,50,60,56]}
test=pd.DataFrame(data=test)
# Creamos un dask df a partir de un pandas df
test= dd.from_pandas(data=test, npartitions=2)
print("Tipo de objeto:", type(test))
test.head()
# Crea un contexto para dask-sql
c = Context()
# Registra el DataFrame de Dask en el contexto para poder referenciarlo en las consultas SQL
c.create_table(table_name="test", input_table=test)
result = c.sql("""
SELECT
Nombre
FROM test
""")
result.compute()
Then I get this error: ParsingException: SchemaError(FieldNotFound { field: Column { relation: None, name: "nombre" }, valid_fields: [] })
I get the same error in more complex dataframes that I am using. Can some one help me understand why this happen?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageAwaiting triage by a dask-sql maintainerAwaiting triage by a dask-sql maintainer