OpenText product name changes coming to the community soon! Learn more.

Wikis - Page

Exclude a file from scan

1 Likes

ISSUE:

ControlPoint allows to exclude files when scanning sources. The graphical interface gives the possibility to exclude file extensions. What if I want to exclude a specific file.

Annotation 2020-04-30 141928.png

HOW TO STEPS:

The connector configuration file gives you more granularity in what you can exclude.

Open the connector configuration file (.cfg).

Go to the task section of the repository: e.g. [TaskMyRepository]

Add the PathCantHaveRegex parameter. In the following example, we exclude "thumb.db" files AND all pdf files.

PathCantHaveRegex0=.*thumb\.db
PathCantHaveRegex1=.*\.(pdf)

Note that you can have multiple parameters with the number at the end.

Also note that when you use these manual adds in the configuration file, you should not use anymore the field in the graphical interface as this will conflict.

See also the file system connector documentation: https://www.microfocus.com/documentation/idol/IDOL_12_3/FileSystemConnector_12.3_Documentation/Help/index.html#Configuration/TaskName/PathCantHaveRegex.htm

Labels:

How To-Best Practice
Comment List
Parents
  • Thanks Colin, it looks fine and data imported successfully.

    When I tried to run StoredProcedure [dbo].[RefreshPublishedDocuments] for sync testing purpose, getting the new error as below:

    Msg 2627, Level 14, State 1, Procedure RefreshPublishedDocuments, Line 260 [Batch Start Line 33]
    Violation of PRIMARY KEY constraint 'PK_AuditDocumentEvent'. Cannot insert duplicate key in object 'dbo.AuditDocumentEvent'. The duplicate key value is (2, 0x000a75c2db9ce279).
    The statement has been terminated.

    When I checked further: DocKey and RepositoryID is the primaryKey in the ControlPointExport "AuditDocumentEvent" table. The SP[RefreshPublishedDocuments], as part of the Step4,  trying to fetch rows from ControlPointMetaStore.ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent and insert here, but it contains duplicates and failing. 

    I can see many duplicate rows in the AuditDocumentEvent table which is surprise to me. Any idea, is it expected behaviour or these duplicates remains because I ran "RemovePolicyFromRejectedDocs.sql" and the Storedprocedure not cleaning the AuditDocumentEvent table causing the issue? The one temp solution, thinking to comment section4  [ I no need AuditDocumentEvent refresh in the Export database ] and rerun the SP again? Any comments are appreciated. 

    --Duplicate of id for pairs based on RepositoryId and Dockey:
    select s.id, t.*
    from ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent s with (nolock)
    join (
    select RepositoryId, Dockey, count(*) as qty
    from ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent with (nolock)
    group by RepositoryId, Dockey
    having count(*) > 1
    ) t on s.RepositoryId = t.RepositoryId and s.DocKey = t.DocKey

Comment
  • Thanks Colin, it looks fine and data imported successfully.

    When I tried to run StoredProcedure [dbo].[RefreshPublishedDocuments] for sync testing purpose, getting the new error as below:

    Msg 2627, Level 14, State 1, Procedure RefreshPublishedDocuments, Line 260 [Batch Start Line 33]
    Violation of PRIMARY KEY constraint 'PK_AuditDocumentEvent'. Cannot insert duplicate key in object 'dbo.AuditDocumentEvent'. The duplicate key value is (2, 0x000a75c2db9ce279).
    The statement has been terminated.

    When I checked further: DocKey and RepositoryID is the primaryKey in the ControlPointExport "AuditDocumentEvent" table. The SP[RefreshPublishedDocuments], as part of the Step4,  trying to fetch rows from ControlPointMetaStore.ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent and insert here, but it contains duplicates and failing. 

    I can see many duplicate rows in the AuditDocumentEvent table which is surprise to me. Any idea, is it expected behaviour or these duplicates remains because I ran "RemovePolicyFromRejectedDocs.sql" and the Storedprocedure not cleaning the AuditDocumentEvent table causing the issue? The one temp solution, thinking to comment section4  [ I no need AuditDocumentEvent refresh in the Export database ] and rerun the SP again? Any comments are appreciated. 

    --Duplicate of id for pairs based on RepositoryId and Dockey:
    select s.id, t.*
    from ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent s with (nolock)
    join (
    select RepositoryId, Dockey, count(*) as qty
    from ControlPointMetaStore.ControlPointmetadata.AuditDocumentEvent with (nolock)
    group by RepositoryId, Dockey
    having count(*) > 1
    ) t on s.RepositoryId = t.RepositoryId and s.DocKey = t.DocKey

Children
No Data
Related
Recommended