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

Request: Initial SQL Read/Write Support #110

Closed
r-richmond opened this issue Nov 3, 2016 · 3 comments
Closed

Request: Initial SQL Read/Write Support #110

r-richmond opened this issue Nov 3, 2016 · 3 comments

Comments

@r-richmond
Copy link
Contributor

Certain Datasources allow for initial sql to be passed. Being able to programmatically modify it would be extremely useful.

@t8y8
Copy link
Contributor

t8y8 commented Nov 3, 2016

@r-richmond Thank you for opening a request!

Would it be possible to include a dummy-tds or twb that already has some initial SQL in it?
Additionally, an example update you may want to make is also great!
It's very helpful for us when building test cases and understand the requirements.

(I'm marking this as an enhancement)

@r-richmond
Copy link
Contributor Author

Sure,

I've attached a sample workbook in #109 that has both query bands and initial sql.

As an example use case I'd like to be able to write something like following;

for workbook in folder:
  for datasource in workbook:
    if datasource.initial_sql is none:
      datasource.initial_sql = 'insert into schema.test_table values(current_timestamp,' + workbook.name + ');'
   elif datasource.initial_sql does not contain 'schema.test_table':
      datasource.initial_sql += '\n 'insert into schema.test_table values(current_timestamp,' + workbook.name + ');'

t8y8 pushed a commit that referenced this issue Jan 9, 2017
graysonarts pushed a commit that referenced this issue Jan 11, 2017
* Fix #117 by only attempting files with the right extension inside the archive (#118)

* Commenting and Docstring cleanup. A few very small code cleanups (#120)

Add docstrings and remove clutter. I also made some very tiny tweaks to some code for clarity.

* Small cleanups for various editors. Play nice with built in test-runners (#121)

* Add Py36, update travis to use pycodestyle (#124)

* Add `initial sql` and `query band` support (#123)

Addresses #109 and #110

* Prep for release of 0.6 (#125)

* Prep for release of 0.6

* wordsmithing the changelog
@r-richmond
Copy link
Contributor Author

Marking this as closed with release 0.6 & the merging of #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants