2
respostas

Dúvida na carga da tabela de fato_001

Boa tarde:

Não Consigo fazer a carga da tabela de Fato001. Ao analisar a base DW_Sucos contatei que Dim_Organizacional tem chave primária Cod_Filho; Mas a Base Fontes_DB tem código como chave primária Cod_Organizacional, mes a chave que foi associada como chave de negócio a quando da carga da Fato_001. Será que essa diferença de nomes não origina erro. Segue o código de erro obtido quando faço START: SSIS package "C:\projetos\DatawarehouseSucos\CargaDatawarehouse1\Cargafatos.dtsx" starting. Information: 0x4004300A at CargaFato001, SSIS.Pipeline: Validation phase is beginning. Information: 0x4004300A at CargaFato001, SSIS.Pipeline: Validation phase is beginning. Warning: 0x80049304 at CargaFato001, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console. Warning: 0x80047076 at CargaFato001, SSIS.Pipeline: The output column "DATA_FATO" (131) on output "OLE DB Source Output" (130) and component "OLE DB Source" (119) is not subsequently used in the Data Flow task. Removing this unused output column can increase Data Flow task performance. Information: 0x40043006 at CargaFato001, SSIS.Pipeline: Prepare for Execute phase is beginning. Information: 0x40043007 at CargaFato001, SSIS.Pipeline: Pre-Execute phase is beginning. Information: 0x4004300C at CargaFato001, SSIS.Pipeline: Execute phase is beginning. Error: 0xC0202009 at CargaFato001, Insert Destination [2]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E2F. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E2F Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E2F Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Fato_001_Dim_Organizacional". The conflict occurred in database "DW_SUCOS", table "dbo.Dim_Organizacional", column 'Cod_Filho'.". Error: 0xC0209029 at CargaFato001, Insert Destination [2]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Insert Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Insert Destination.Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. Error: 0xC0047022 at CargaFato001, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Insert Destination" (2) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (15). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. Information: 0x40043008 at CargaFato001, SSIS.Pipeline: Post Execute phase is beginning. Information: 0x4004300B at CargaFato001, SSIS.Pipeline: "Insert Destination" wrote 0 rows. Information: 0x40043009 at CargaFato001, SSIS.Pipeline: Cleanup phase is beginning. Task failed: CargaFato001 Warning: 0x80019002 at Cargafatos: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "C:\projetos\DatawarehouseSucos\CargaDatawarehouse1\Cargafatos.dtsx" finished: Failure. The program '[9468] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).

2 respostas

Oiii João, tudo bom?

Pelo que analisei, pode ser que essa diferença de nomes esteja ocasionando o erro.

Sugiro que faça a alteração do nome dos campos e tente fazer a carga novamente.

Qualquer coisa estou por aqui, tá bom? É só falar :)

João, peço desculpas pelo equívoco na resposta anterior.

Os nomes das chaves primárias em tabelas distintas não prejudica ao realizar as cargas.

O erro que mandou, temos o seguinte: “DTS_E_INDUCEDTRANSFORMFAILUREONERROR”

Isso quer dizer que no seu projeto, tem um conflito entre os tipos dos dados, algum dado não foi convertido corretamente. Como o erro indica os campos Dim_Organizacional e de Cod_Filho, preciso que você veja o seguinte:

Volte na criação da Dim_Organizacional, e verifique se a conversão de dados foi realizada corretamente. Em específico, verifique se Cod_Filho está marcado como “cadeia de caracteres unicode” e comprimento de 50.

Verifique também, se no projeto em que fizemos as tabelas do banco de dados, Cod_Filho está configurado para ser “nvarchar 50”.

Qualquer coisa me fala, tá bom? Tô por aqui.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software