Hitachi Vantara Pentaho Community Forums
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Automatically create (or drop and recreate) a SQL table before exporting to SQL?

  1. #11
    Join Date
    Apr 2008
    Posts
    4,513

    Default

    Quote Originally Posted by SQLista View Post
    Except I never get to what you call the System Execution phase. You have made some incorrect assumptions about my workflow. I am not working in a production database. I have a local Microsoft SQL Server Express server on my machine, which I use as a "scratchpad" database. In summary, every project is pretty much independent and stand-alone; I receive some data from a third-party, cleansing and analysing it. It's a very iterative, trial-and-error process: I receive this data, cleanse the field I need, run some analyses, then maybe realise I need to cleanse 5 or 6 more fields, etc. I do not need most of the fields so cleansing all of them is not the best use of my time. Once a project is completed, the new one will be different.
    If the columns you are "cleansing" are not changing types, then using the "Truncate Table" option of Table Output is exactly what you are looking for - it will empty out the table that you have aleady created.

    The SQL button in the Table Output Step will tell you what needs to change in your DB in order to be compatible with your incoming stream -- so if the table does not exist, it will suggest building one.

    It's really THAT simple.

  2. #12
    Join Date
    Jun 2012
    Posts
    5,526

    Default

    Just for feature completeness: You can configure a SQL script into the Database Connection (Advanced section) that is executed right after the connection is established.
    pdi-ce user (mostly 4.4)
    java 1.8.0_131 (OpenJDK)
    ubuntu 16.04 LTS (x86_64)
    timezone CET / CEST
    contemplative reading SSCCE
    sig updated 2017-10-20

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.