3

I am trying to create table schema based on columns metadata in Script Component. Its everything fine, but I realized that the metadata columns are incorrect :(. I mean in origin way they should have underscores in names. SSIS is deleting this marks and unfortunately I have to had original column name instead without underscores. Do You have some explanation ? It might be helpful :P

  1. This is original source table column names

enter image description here

  1. This is my connection definition (see there underscores still exists) :

enter image description here

  1. Script component definition metadata (see there underscores still exists)

enter image description here

  1. Suddenly underscores disappear:

enter image description here

  1. Example message box which is showing directly what I want to achieve:

enter image description here

Hadi
  • 36,233
  • 13
  • 65
  • 124
Bartosz
  • 35
  • 4
  • 2
    Possible duplicate of [SSIS Script Component stripping underscores from column names](https://stackoverflow.com/questions/6352940/ssis-script-component-stripping-underscores-from-column-names) – Yahfoufi Apr 13 '19 at 10:32
  • hello, i do not know this is right solution. I mean, all task is about "maintenance-free" for developers who II use this ETL. First script component should create schema of source table (see point no. 5) and then in second script task this table (in destination - mssql). If I add copy column all of developers must enter to data flow and make correction of columns names every time.. In that case, my component script is not needed because every developer can enter and create a manual data flow between eg ado net and oledb destination – Bartosz Apr 13 '19 at 11:35

1 Answers1

0

I don't think it is a good choice to generate a Create Table statement based on Script Component Columns metadata since all symbols are removed from Columns names (not only underscore). You can simply use an SQL Statement to do that:

To implement this solution in SSIS, use an Execute SQL Task and store the result within a ResultSet:

Hadi
  • 36,233
  • 13
  • 65
  • 124