Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

0 votes
1 answers
523 views
Power BI refresh dataflow keep a snapshot of data
my requirement is to be able to save the past state of an entity at a certain point of time. Currently when the dataflow is refreshed, the past state is lost and only the current one is displayed. Is there a way to do it? I tried setting up the incremental refresh but not sure if it fits the require...
my requirement is to be able to save the past state of an entity at a certain point of time. Currently when the dataflow is refreshed, the past state is lost and only the current one is displayed. Is there a way to do it? I tried setting up the incremental refresh but not sure if it fits the requirement. The ideal would be having the table with a column snapshot date that is populated by the current refresh time and at each refresh this table will be populated by new rows and a new refresh time instead of replacing all the rows.
Yousra (1 rep)
Jun 15, 2021, 10:32 AM • Last activity: Apr 17, 2025, 06:01 PM
0 votes
1 answers
40 views
How can the data flow show the number of values changed by a Derived Column that replaces a given column if a condition is met?
I take a Derived Column Transformation to replace a value as soon as a condition on two other columns is met. How can I see in the data flow how often a value changes by this replacement? Is there a way to show it on the output arrow, or how else can I show the changes inside the data flow? #### PS...
I take a Derived Column Transformation to replace a value as soon as a condition on two other columns is met. How can I see in the data flow how often a value changes by this replacement? Is there a way to show it on the output arrow, or how else can I show the changes inside the data flow? #### PS (not needed for the Q/A) I want to check whether the string input is the same as the lookup output. But sometimes, names (first names and last names) have more than one name in the value, like Taylor-Smith against Smith, or Bob Thomas against Bob. People might marry or might in times fill their two first names so that data might not match over two master data accounts.
(DT_BOOL)(FINDSTRING(name,[Lookup.name],1)) ? 1 : [score_name]
The value of column score_name is replaced by 1 as soon as the name is found inside the Lookup.name, else the value is kept which is between 0 and 1. "Name in Lookup?": enter image description here enter image description here You could take any other example like [Replace column values?](https://dba.stackexchange.com/questions/47980/replace-column-values) , the question does not depend on what is done.
questionto42 (366 rep)
Jul 26, 2024, 09:29 PM • Last activity: Jul 29, 2024, 09:07 PM
0 votes
1 answers
124 views
The debugger only stops at the breakpoints of the first Script Component. How do I debug more than one Script Component in an SSIS Data Flow Task?
This takes up [How to debug a script component in SSIS - Stack Overflow](https://stackoverflow.com/questions/6446619/how-to-debug-a-script-component-in-ssis) which was asked for the 2008 version and is now outdated. That is why this question needs to be revived for the versions of nowadays. I put a...
This takes up [How to debug a script component in SSIS - Stack Overflow](https://stackoverflow.com/questions/6446619/how-to-debug-a-script-component-in-ssis) which was asked for the 2008 version and is now outdated. That is why this question needs to be revived for the versions of nowadays. I put a breakpoint in two Script Components in an SSIS Data Flow Task. Only the first Script Component gets debugged, as soon as I reach the second, the script is run to its end without stopping at any breakpoint. How can I debug the second Script Component so that the debugger stops at the breakpoints there?
questionto42 (366 rep)
Apr 8, 2024, 09:42 AM • Last activity: May 15, 2024, 05:30 PM
0 votes
1 answers
553 views
How do you detect a change in grouping when using Partition By in SQL Server 2012+ and execute logic based upon the change in the same SQL statement?
If I have a SQL statement that contains something like, ``` ROW_NUMBER() OVER(PARTITION BY school_area ORDER BY school_area) ``` I get: ``` 1 someschool1 schoolarea1 2 someschool2 schoolarea1 3 someschool3 schoolarea1 1 soomschool4 schoolarea2 2 ... ``` How can I detect when that parition of data "r...
If I have a SQL statement that contains something like,
ROW_NUMBER() OVER(PARTITION BY school_area ORDER BY school_area)
I get:
1 someschool1 schoolarea1
2 someschool2 schoolarea1
3 someschool3 schoolarea1
1 soomschool4 schoolarea2
2 ...
How can I detect when that parition of data "resets"? In other words, when my result set went from 3 back to 1 above, is it possible to tell that in the same SQL statement? When I use,
CASE 
    WHEN school_area=1 THEN do something
END
I could not do any logic like run an email routine after the THEN. It doesn't work because that's not what it's for. I thought I would do it in a WHILE, but I didn't know if I was missing something I could do in the SQL statement itself. I was trying to avoid loops and/or cursors, but I think it is the only way.
learntofix (3 rep)
Sep 23, 2021, 03:28 PM • Last activity: Sep 23, 2021, 03:56 PM
3 votes
1 answers
553 views
SSIS Merge Join: Delete does not work
I've set up a Data Flow Task to sync a flat file with its destination table using a Merge Join with a Left Outer Join as described [here][1] (and [elsewhere][2]). [![enter image description here][3]][3] **Merge Join**: [![enter image description here][4]][4] Inserting and Updating works fine, howeve...
I've set up a Data Flow Task to sync a flat file with its destination table using a Merge Join with a Left Outer Join as described here (and elsewhere ). enter image description here **Merge Join**: enter image description here Inserting and Updating works fine, however, deleting a record from the flat file does nothing. I guess it's something with the **Conditional Split**: delete ISNULL(gid_csv) && !ISNULL(gid) enter image description here or the following SQL Command: DELETE FROM dbo.gusers WHERE gid = ? enter image description here The OLE DB Source and the three destinations are accessing the same table. What do I miss?
wp78de (317 rep)
May 14, 2019, 05:18 PM • Last activity: Dec 17, 2020, 12:00 PM
0 votes
1 answers
5214 views
SSIS - Disable Task Based on Variable Value
I have an SSIS package that runs a number of **Data Flow Tasks** all at the same time. Each **Data Flow Task** is placed inside a Sequence Container. Before the **Data Flow Tasks** are run, a **Script Task** is used to check what **Data Flow Tasks** are required to run. Each **Data Flow Task** also...
I have an SSIS package that runs a number of **Data Flow Tasks** all at the same time. Each **Data Flow Task** is placed inside a Sequence Container. Before the **Data Flow Tasks** are run, a **Script Task** is used to check what **Data Flow Tasks** are required to run. Each **Data Flow Task** also has a related variable, which is set to true or false by the **Script Task**. The Data Flow Tasks use the variable value as a *Disable Expression* property. When run initially, the process works as expected. Those Tasks that have variable value = true do run, and those that have a variable value = false do not run. However, the next time I go to run the package all **Data Flow Tasks** are disabled initially (probably because the related variables are set to false). But even when some variables are then set to true at runtime, the Tasks remain disabled. The *Disable Expression* does not seem to pick up the latest variable value. (in the Watch window I can see the variable values have updated correctly) I tried setting '*DelayValidation*' *= true* on each Task but no change. Any reason why this happens? enter image description here
Kevin (533 rep)
Feb 22, 2018, 01:56 PM • Last activity: Feb 22, 2018, 02:41 PM
2 votes
1 answers
33 views
How is SSDT Data Flow batching handled?
How does SSDT handle batching of `Data Flow` tasks? I am parsing a CSV that is about 1GB into SQL Server using SSDT. In the Data Flow there is a `Flat File` source, that goes to an OLE DB destination (a staging table). Then an SP is executed using a SQL Task. The CSV being parsed contains a summary...
How does SSDT handle batching of Data Flow tasks? I am parsing a CSV that is about 1GB into SQL Server using SSDT. In the Data Flow there is a Flat File source, that goes to an OLE DB destination (a staging table). Then an SP is executed using a SQL Task. The CSV being parsed contains a summary table and a child table with a foreign key reference to the summary table. As such the CSV contains duplicated IDs of the summary table (so there is one line per child row). If a single summary ID were to be split across two batches, then I would lose data - the SP does something like "delete from child table where ID in staging, then re-insert from staging into child table". Previously we had to do this because the vendor wasn't exporting a unique ID for the child data. They are now, so I can use a merge statement. But. I would still like to know if Data Flow tasks are batched, and if so, how?
Zach Smith (2430 rep)
Feb 14, 2018, 09:34 AM • Last activity: Feb 15, 2018, 09:42 AM
Showing page 1 of 7 total questions