Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external source to create with template #8295

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/merge-v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,8 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
# Build first - lombok & other pre-processing may be needed. safer...
- name: build and publish to maven central
if: ${{ github.ref == 'refs/heads/main'}}
uses: gradle/gradle-build-action@v3
with:
cache-read-only: false
arguments: build publish
# Import secrets needed for code signing and distribution
env:
OSSRH_GPG_KEYID: ${{ secrets.OSSRH_GPG_KEYID }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
OSSRH_GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_mavenRepoPass: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_mavenRepoUser: ${{ secrets.OSSRH_USERNAME }}
# In other cases just build but don't publish
# Just build but don't publish (yet)
- name: build (no publish to maven central)
if: ${{ github.ref != 'refs/heads/main'}}
uses: gradle/gradle-build-action@v3
with:
cache-read-only: false
Expand Down Expand Up @@ -125,3 +110,17 @@ jobs:
name: Jacoco Coverage Report
path: build/reports/jacoco/codeCoverageReport
if-no-files-found: ignore
# Build and publish to Maven central for main branch only - this often fails which is why it is done last
- name: build and publish to maven central
if: ${{ github.ref == 'refs/heads/main'}}
uses: gradle/gradle-build-action@v3
with:
cache-read-only: false
arguments: build publish
# Import secrets needed for code signing and distribution
env:
OSSRH_GPG_KEYID: ${{ secrets.OSSRH_GPG_KEYID }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
OSSRH_GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_mavenRepoPass: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_mavenRepoUser: ${{ secrets.OSSRH_USERNAME }}
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Content-Type: application/json

###

@server1GUID=7a70c3de-f798-42cf-844f-1ee2dac824aa
@server1GUID=a0fa7331-a926-47a2-8fb0-31e01ba5f08a


###
Expand Down Expand Up @@ -226,7 +226,7 @@ Content-Type: application/json

###

@ucSchemaGUID=632ac7ff-6ca1-4d06-b160-0daad5486727
@ucSchemaGUID=c857b5a1-e497-4436-ac6b-c2265dcc4892

###
# @name=getAssetGraph (schemas)
Expand All @@ -251,7 +251,7 @@ Content-Type: application/json

###

@ucVolumeGUID=5e44ba90-9813-411d-aa62-36e5cc2cdf24
@ucVolumeGUID=0df2166f-5aa8-4a9d-b21f-c62b38d9b974

###
# @name=getAssetGraph (volumes)
Expand All @@ -263,6 +263,28 @@ Authorization: Bearer {{token}}
Content-Type: application/json


###

@ucVolumeSurveyName=AssetSurvey:survey-unity-catalog-volume

###
# @name initiateGovernanceActionType
# Using the named governance action type as a template, initiate a single engine action.
POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/initiate
Authorization: Bearer {{token}}
Content-Type: application/json

{
"class" : "InitiateGovernanceActionTypeRequestBody",
"governanceActionTypeQualifiedName": "{{ucVolumeSurveyName}}",
"actionTargets": [
{
"class" : "NewActionTarget",
"actionTargetName": "volume",
"actionTargetGUID": "{{ucVolumeGUID}}"
} ]
}

###
# @name getTechnologyTypeElements (Tables)
# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,24 +248,29 @@ protected File getFile(String methodName) throws FileException
{
if (folderName == null)
{
this.throwException(BasicFileConnectorErrorCode.FILE_NOT_SPECIFIED, methodName, null, null);
this.throwException(BasicFileConnectorErrorCode.FOLDER_NOT_SPECIFIED, methodName, null, null);
}

if (folderName.startsWith("file://"))
{
folderName = folderName.substring(7);
}

File fileStore = new File(folderName);

if (! fileStore.exists())
{
this.throwException(BasicFileConnectorErrorCode.FILE_NOT_FOUND, methodName, folderName, null);
this.throwException(BasicFileConnectorErrorCode.FOLDER_NOT_FOUND, methodName, folderName, null);
}

if (! fileStore.isDirectory())
{
this.throwException(BasicFileConnectorErrorCode.FILE_SPECIFIED, methodName, folderName, null);
this.throwException(BasicFileConnectorErrorCode.FILE_NOT_DIRECTORY, methodName, folderName, null);
}

if (! fileStore.canRead())
{
this.throwException(BasicFileConnectorErrorCode.FILE_NOT_READABLE, methodName, folderName, null);
this.throwException(BasicFileConnectorErrorCode.FOLDER_NOT_READABLE, methodName, folderName, null);
}

return fileStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,41 @@ public enum BasicFileConnectorErrorCode implements ExceptionMessageSet
"Ensure the name of a readable file is passed in the address property in the Endpoint object of the Connection object."),

/**
* BASIC-FILE-CONNECTOR-400-004 - The file {0} given in Connection object {1} is a directory
* BASIC-FILE-CONNECTOR-400-005 - The folder name is null in the Connection object {0}
*/
FILE_SPECIFIED(400, "BASIC-FILE-CONNECTOR-400-004",
"The pathname {0} given in Connection object {1} points to a file not a directory",
"The connector is unable to work with a file.",
"Ensure a valid directory name is passed in the address property in the Endpoint object of the Connection object."),
FOLDER_NOT_SPECIFIED(400, "BASIC-FILE-CONNECTOR-400-005",
"The folder name is null in the Connection object {0}",
"The connector is unable to open the folder because the name of the folder is not passed in the Connection object.",
"The name of the folder should be set up in the address property of the connection's Endpoint object."),

/**
* BASIC-FILE-CONNECTOR-400-006 - The folder {0} given in Connection object {1} is a file
*/
FILE_NOT_DIRECTORY(400, "BASIC-FILE-CONNECTOR-400-006",
"The folder {0} given in Connection object {1} is a file",
"The connector is unable to work with a file.",
"Ensure a valid folder name is passed in the address property in the Endpoint object of the Connection object."),

/**
* BASIC-FILE-CONNECTOR-400-007 - The folder {0} given in Connection object {1} is not readable
*/
FOLDER_NOT_READABLE(400, "BASIC-FILE-CONNECTOR-400-007",
"The folder {0} given in Connection object {1} is not readable",
"The connector is unable to open the folder because it does not have permission to read the file.",
"Ensure a readable folder name is passed in the address property in the Endpoint object of the Connection object."),

/**
* BASIC-FILE-CONNECTOR-404-001 - The folder named {0} in the Connection object {1} does not exist
*/
FOLDER_NOT_FOUND(404, "BASIC-FILE-CONNECTOR-404-001",
"The folder named {0} in the Connection object {1} does not exist",
"The connector is unable to open the folder because it does not exist.",
"Add the name of an existing folder to the address property of the connection's Endpoint object."),

/**
* BASIC-FILE-CONNECTOR-404-001 - The file named {0} in the Connection object {1} does not exist
* BASIC-FILE-CONNECTOR-404-002 - The file named {0} in the Connection object {1} does not exist
*/
FILE_NOT_FOUND(404, "BASIC-FILE-CONNECTOR-404-001",
FILE_NOT_FOUND(404, "BASIC-FILE-CONNECTOR-404-002",
"The file named {0} in the Connection object {1} does not exist",
"The connector is unable to locate the file it has been asked to work with.",
"Ensure that the name of the file in the address property of the connection's Endpoint object matches the location of the file " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private void scanFile(CSVFileStoreConnector connector) throws FileException,
}
catch (FileException error)
{
assertTrue("BASIC-FILE-CONNECTOR-404-001 The file named BadFileName in the Connection object CSVFileStore.Connection.Test does not exist".equals(error.getMessage()));
assertTrue("BASIC-FILE-CONNECTOR-404-002 The file named BadFileName in the Connection object CSVFileStore.Connection.Test does not exist".equals(error.getMessage()));
}
catch (Exception exception)
{
Expand Down
Loading
Loading