How to Create Timestamp column (Inside Pipeline) in destination SQL database table while migrating data from ADLS to SQL - sql-server-2008

I am migrating bulk of parquetfiles from ADLS to SQL database table so inside ForEach i used copy activity and it's copy data successfully for all tables.Now in that every table i have to add add column timestamp so it's gives the DATE in that column when that data loaded in that respective table.so what should i do in that pipeline so that in that table one timestamp column gets added and give the DATE when data gets loaded.

Use a data flow with a derived column called "timestamp" set to currentTimestamp()

Related

How to add a new column by aggregating values from multiple columns in SSIS

I have an excel file that I imported in SSIS and want to transfer it to SQL server as a new table in the destination DB, the table is shown in the screenshot below:
I want to calculate the Average of Scores for each player as new column as shown in the screenshot.
I tried to accomplish this, but I couldn't success.
Rather let the database handle the transformation as your database will most likely do it faster than letting SSIS do it, insert your data into your destination but leave average column as NULL, write an UPDATE sql or STORED PROCEDURE to update your average column after the load, let SSIS call the update after doing the load

Mysql - Views are automatically converted into empty tables with default datatype tinyint(4)

In google cloud hosted platform, for my project i created some mysql views. approximately those views are having 10k rows.
After some time views are automatically converted into empty tables with table name as respective view name. Columns in that table are set to default datatype tinyint(4).
At the time of views to table conversion, views are deleted automatically and created table has empty rows.
If i execute an select statement with view_name it fetches data from created table not from view( because there is no view in that name ). so it gives empty data.
If i delete those empty tables and recreate that views then i can able to get those data's on select query.
After sometime, again views are automatically converted into tables. Then it select query returns empty data.
This process happens regularly.
Why views are automatically converted into empty tables?
Snapshot of a converted table

add parameter value to table at import SSIS

I am importing an Excel table from an ftp site to SQL using SSIS. The destination table is going to be used to calculate good and bad records based on another SQL database. Here is my problem. The Excel file is name RTW_032613_ABC_123.xls. This file name is a concatenation of a number of fields. I cannot recreate it based on the fields in the table, so I need to retain it and pass it to the new table in SQL. I have a parameter #FileName that I am using to loop through the files in the ftp folder. What I would like to do is either combine the import of data from the Excel file with the file name or insert the file name in each record after the import. I am calling the SSIS procedure from another stored procedure in SQL. I tried adding a SQL data flow task but I am not seeing where I add the insert statement on either the SQL Server Compact Destination or SQL Server Destination.
I am over my head with SSIS on this one. The key is that the parameter that I need is available in SSIS but I really need to get it passed on to my SQL table.
TIA
If I'm reading your question right, you have an SSIS package with a variable containing the filename and you want to save the filename with each row that you are sending to your SQL table? If so:
Add a derived column to the data flow, making a new column and referencing the variable in the expression
Include that new column in the mapping for the destination of your data flow, sending the filename to whichever column you would like to save that data in.
No need for a seperate SQL task.

SQL Server Integration Services

I am using SSIS to import an Excel file into a table in my SQL Server 2008 database.
Currently I am able to import data into the table by using data flow setting Excel file as the source and data table as the destination. My current import is based on the column mapping between source and the destination, but now I want to add an extra column to the table (basically this column will have the id that is given to the Excel file of which the rows are part of, so this value will be same for each row that belongs to the file whose data we are currently importing)
This column is not present in the source Excel sheet and its value is in a SSIS user variable. I want the insertion of this value a part of the import process, but I cannot figure it out?
How can I achieve this?
The connection manager for the destination doesn't allow me to map user variables to columns...
Put in a Derived column between the Excel Source and the Database destination.
Create a column there and use the SSIS User Variable as the value expression for the column.
Add a execute SQL task after the dataflow task and update the extra column with the variable with an update statement.

Using dynamically named table in SSIS data flow task

I'm new to SSIS and am writing a package that includes moving data to a table that is created in a previous Execute SQL Task object.
The issue that I'm encountering is that I am unable to create a data flow destination task that uses a dynamic destination table name.
The intended process is:
Execute SQL Task object creates new table based on today's date (i.e. Table1_20111014)
Data Flow task moves data from table "Table1" to "Table1_20111014".
The column metadata for Table1 and Table1_20111014 are the same, and does not change. However, the name of the table the data needs to be moved to will change depending on the date at time of execution.
Is it possible to dynamically specify the destination table in a destination data flow object?
If not, are there known workarounds or is using SSIS for this task a bad idea?
As long as the meta data remains the same, there is no drawback to using dynamic destination table name.
To accomplish this, on the ole db destination instead of using "table name" or "table name fast load" use the equivalent "from variable" table load option. This obviously assumes you have a variable defined that contains the name of the table created in the execute sql task