cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::5.0.1 user lacks privilege or object not found: full questionnaire in statement [SELECT * FROM "full questionnaire" WHERE 1=0]

valdereo
New Contributor

I have followed the steps given here to parse .accdb files using ucanaccess on Azure Databricks, however, I receive errors.

See below my code:

# Connection properties
conn_properties = {"driver" : "net.ucanaccess.jdbc.UcanaccessDriver"}
 
# Path
url = "jdbc:ucanaccess:///dbfs/mnt/dropzone/xyx.accdb"
 
# Table
dbtable = "full questionnaire"
 
# Dataframe
df_accdb = spark.read.jdbc(url = url, table = dbtable, properties = conn_properties)
 
df_accdb.printSchema()

Below is a screenshot of the error message:

net.ucanaccess.jdbc.UcanaccessSQLException_ UCAExc___5.0.1 user lacks privilege or object not found_ full questionnaire in statement [SELECT _ FROM  "full questionnaire" WHERE 1=0] 

Any tips on how I can resolve this issue?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Atanu
Esteemed Contributor
Esteemed Contributor

@Valeri Nteleahโ€‹ this looks like data privilege issue, This might help you if I understand correct - https://docs.databricks.com/security/access-control/table-acls/object-privileges.html#:~:text=The%20....

View solution in original post

4 REPLIES 4

Kaniz
Community Manager
Community Manager

Hi @Valeri Nteleahโ€‹ , Please try to use a PreparedStatement and a parameterized query.

Kaniz
Community Manager
Community Manager

Hi @Valeri Nteleahโ€‹  , Just a friendly follow-up. Do you still need help, or did you find the solution? Please let us know.

Atanu
Esteemed Contributor
Esteemed Contributor

@Valeri Nteleahโ€‹ this looks like data privilege issue, This might help you if I understand correct - https://docs.databricks.com/security/access-control/table-acls/object-privileges.html#:~:text=The%20....

Atanu
Esteemed Contributor
Esteemed Contributor

@Valeri Nteleahโ€‹ please let me know if you need further help on this.

Thanks

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!