Skip to content

Request: Initial SQL Read/Write Support #110

Closed

Description

@r-richmond

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

Activity

  1. t8y8 commented on Nov 3, 2016

    @t8y8
    Contributor

    @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)

  2. r-richmond commented on Nov 3, 2016

    @r-richmond
    ContributorAuthor

    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 + ');'
    
  3. added a commit that references this issue on Jan 11, 2017
  4. r-richmond commented on Jan 20, 2017

    @r-richmond
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions