Skip to content

Conversation

@abuisman
Copy link

@abuisman abuisman commented Aug 7, 2022

We are looking at replacing, amongst other things, Heroku dataclips with Blazer. The thing that we use a lot with dataclips is the sharing feature: it allows a developer to write a SQL query, they then share the CSV url with a non-technical person who can then import that into whatever tool that supports CSVs. Every time they re-download the CSV it is up-to-date with the query. When importing into Google sheets it results in an always up-to-date sheet, great all around.

In this PR I have added the feature to Blazer.

image

In building I realised I can still extract it and sort of patch it in, but I'd rather contribute back. I've tried to keep close to the overall design and style.

The only change I needed to make to the QueriesController that might be a good change regardless of this feature is the following:

From:

@statement = Blazer::Statement.new(params[:statement], @data_source)

To:

sql_statement = params[:statement] || @query.statement
@statement = Blazer::Statement.new(sql_statement, @data_source)

@abuisman
Copy link
Author

I've updated the design as suggested by @bdewater. I now generate a token per query which allows for easy per-query revoking of access. Great suggestion.

@abuisman abuisman requested a review from bdewater September 11, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants