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

New SQLClient API #808

Closed
Jesus89 opened this issue Jun 25, 2019 · 1 comment · Fixed by #840
Closed

New SQLClient API #808

Jesus89 opened this issue Jun 25, 2019 · 1 comment · Fixed by #840
Assignees
Labels

Comments

@Jesus89
Copy link
Member

Jesus89 commented Jun 25, 2019

Refactor cc.query feature. New class? new method?

Update

From the doc:

from cartoframes.client import SQLClient

sql_client = SQLClient(creds)
sql_client.query('select …') // Uses the SQL API
sql_client.execute('insert …')  // Uses the Batch SQL API

# Helpers (future)
sql_client.create_table(‘table_name’)
sql_client.distinct(‘table_name’, ‘column_name’)
sql_client.bounds(‘table_name’)
@simon-contreras-deel
Copy link
Contributor

simon-contreras-deel commented Jul 1, 2019

I see 2 options:

  • a function if it will only send queries to SQL API
  • a new object if we add more features (custom queries) over the SQL API:
    • create table
    • cartodbfy table
    • call to that data services functions
    • ...

I am not sure about the second one, so I would say a function is enough, but maybe someone see more things based on the second one

@Jesus89 Jesus89 changed the title New Query API New SQLClient API Jul 5, 2019
@Jesus89 Jesus89 self-assigned this Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants