Skip to content
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: the tablespace setting has no effect on the uploaded tables #243

Open
kimakan opened this issue Aug 6, 2024 · 0 comments
Open

BUG: the tablespace setting has no effect on the uploaded tables #243

kimakan opened this issue Aug 6, 2024 · 0 comments
Assignees
Labels
app:query concern the query-app bug

Comments

@kimakan
Copy link
Contributor

kimakan commented Aug 6, 2024

The settings variable USER_TABLESPACE sets the tablespace for the tables created by the daiquiri user. However, it's not taken into account for the uploaded tables.
For the query job, the tablespace is selected correctly via

query = 'SET SESSION statement_timeout TO %(timeout)s; COMMIT; CREATE TABLE %(schema)s.%(table)s'
if params['tablespace'] is not None:
query = query + ' TABLESPACE %(tablespace)s AS %(query)s'
else:
query = query + ' AS %(query)s'

Tablespace is missing in the table creation statement for the upload

sql = 'CREATE TABLE %(schema)s.%(table)s (%(columns)s);' % {
'schema': self.escape_identifier(schema_name),
'table': self.escape_identifier(table_name),
'columns': ', '.join([
'%(column_name)s %(column_type)s' % {
'column_name': self.escape_identifier(column['name']),
'column_type': self.COLUMNTYPES[column['datatype']]
} for column in columns])

@kimakan kimakan added bug app:query concern the query-app labels Aug 6, 2024
@kimakan kimakan self-assigned this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:query concern the query-app bug
Projects
None yet
Development

No branches or pull requests

1 participant