0

我需要允许几个用户修改我数据库中的表,最好是作为集成包的一部分,然后将更改提交到我们的实时数据库中。

请允许我进一步解释:

我们有一个从一个数据库系统到另一个数据库系统的自动导入任务,数据转换正在进行中。

作为此任务的一部分,在最终导入之前运行各种检查,并且任何数据不完整或不正确的行都将发送到拒绝表并从导入表中删除。

我现在需要允许几个高级用户能够查看和更正拒绝表中丢失/不正确的条目,然后再重新暂存并提交到实时数据库。(很明显,提交前会重新检查,如果仍然错误则重新拒绝)。

谁能告诉我在 SSIS 中我需要做什么才能向从本地 PC 运行此包的用户显示特定表(例如 MyDatabase.dbo.Reject_Table)的内容(当然,该包将位于服务器上)。

然后他们需要能够修改表格的内容 - 一次 1 行或整体。不打扰哪个)。

完成后,他们点击“继续”或“下一步”类型的按钮,然后继续运行包的其余部分,我非常乐意编写。

这只是我正在努力的互动阶段,我非常感谢一些建议。

谢谢克雷格

4

1 回答 1

2

That is non-native functionality in SSIS.

You can write pretty much anything you want in a script task and that includes GUI components. (I once had a package play music). In your data flow, you would have a Script Component that edits each row passing through the component.

Why this is a bad idea

Suitability - This isn't really what SSIS is for. The biggest challenge you'll run into is the data flow is tightly bound to the shape of the data. The reject table for Customer is probably different than the reject table for Phone.

Cost - How are you going to allow those senior users to run SSIS packages? If the answer involves installing SSIS on their machines, you are looking a production license for SQL Server. That's 8k to 23k ish per socket for SQL Server 2005-2008R2 and something insane per core for SQL Server 2012+.

What is a better approach

As always, I would decompose the problem into smaller tasks until I can solve it. I'd make 2 problem statements

  1. As a data steward, I need the ability to correct (edit) incomplete data so that data can be imported into our application.
  2. As an X, I need the ability to import (workflow) corrected rejected data so that we can properly bill our customers (or whatever the reason is).

Editing data. I'd make a basic web page or thick client app to provide edit capability. A DataGridView would be one way of doing. Heck, you could forgo custom development and just slap an Access front end to the tables and let them edit the data through that.

Import corrected data. This is where I'd use SSIS but possibly not exclusively. I'd probably look at adding a column to all the reject tables that indicates whether it's ready for reprocessing. For each reject table, I'd have a package that looks for any rows flagged as ready. I'd probably use a Delete first pattern to remove the flagged data and either insert it into the production tables or route it back into the reject table for further fixing. The mechanism for launching the packages could be whatever makes sense. Since I'm lazy,

  1. I'd have a SQL Agent job that runs the packages and
  2. Create a stored proc which can start that job
  3. Grant security on that stored proc to the data stewards
  4. Provide the stewards a big red button that says Import How that's physically implemented would depend on how you solved the edit question.
于 2013-05-15T12:30:38.660 回答