Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
9d597f24
Commit
9d597f24
authored
Apr 13, 2020
by
chaitali borole
Committed by
nixonrodrigues
Jun 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3724 : Update Qualified name pattern for Column since it cause ambiguity in Quickstart data.
Signed-off-by:
nixonrodrigues
<
nixon@apache.org
>
parent
8b5cb9d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
QuickStartV2.java
...src/main/java/org/apache/atlas/examples/QuickStartV2.java
+33
-33
No files found.
webapp/src/main/java/org/apache/atlas/examples/QuickStartV2.java
View file @
9d597f24
...
@@ -188,7 +188,7 @@ public class QuickStartV2 {
...
@@ -188,7 +188,7 @@ public class QuickStartV2 {
quickStartV2
.
closeConnection
();
quickStartV2
.
closeConnection
();
}
}
}
}
}
}
static
String
[]
getServerUrl
(
String
[]
args
)
throws
AtlasException
{
static
String
[]
getServerUrl
(
String
[]
args
)
throws
AtlasException
{
...
@@ -351,56 +351,56 @@ public class QuickStartV2 {
...
@@ -351,56 +351,56 @@ public class QuickStartV2 {
// Table entities
// Table entities
AtlasEntity
salesFact
=
createTable
(
SALES_FACT_TABLE
,
"sales fact table"
,
salesDB
,
"Joe"
,
MANAGED_TABLE
,
AtlasEntity
salesFact
=
createTable
(
SALES_FACT_TABLE
,
"sales fact table"
,
salesDB
,
"Joe"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
SALES_DB
,
SALES_FACT_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
SALES_DB
,
SALES_FACT_TABLE
,
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
SALES_DB
,
SALES_FACT_TABLE
,
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
SALES_COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
createColumn
(
SALES_
DB
,
SALES_FACT_TABLE
,
SALES_
COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
FACT_CLASSIFICATION
);
FACT_CLASSIFICATION
);
AtlasEntity
productDim
=
createTable
(
PRODUCT_DIM_TABLE
,
"product dimension table"
,
salesDB
,
"John Doe"
,
MANAGED_TABLE
,
AtlasEntity
productDim
=
createTable
(
PRODUCT_DIM_TABLE
,
"product dimension table"
,
salesDB
,
"John Doe"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
Arrays
.
asList
(
createColumn
(
SALES_DB
,
PRODUCT_DIM_TABLE
,
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
PRODUCT_NAME_COLUMN
,
"string"
,
"product name"
),
createColumn
(
SALES_DB
,
PRODUCT_DIM_TABLE
,
PRODUCT_NAME_COLUMN
,
"string"
,
"product name"
),
createColumn
(
BRAND_NAME_COLUMN
,
"int"
,
"brand name"
)),
createColumn
(
SALES_DB
,
PRODUCT_DIM_TABLE
,
BRAND_NAME_COLUMN
,
"int"
,
"brand name"
)),
DIMENSION_CLASSIFICATION
);
DIMENSION_CLASSIFICATION
);
AtlasEntity
customerDim
=
createTable
(
CUSTOMER_DIM_TABLE
,
"customer dimension table"
,
salesDB
,
"fetl"
,
EXTERNAL_TABLE
,
AtlasEntity
customerDim
=
createTable
(
CUSTOMER_DIM_TABLE
,
"customer dimension table"
,
salesDB
,
"fetl"
,
EXTERNAL_TABLE
,
Arrays
.
asList
(
createColumn
(
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
Arrays
.
asList
(
createColumn
(
SALES_DB
,
CUSTOMER_DIM_TABLE
,
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
NAME_COLUMN
,
"string"
,
"customer name"
,
PII_CLASSIFICATION
),
createColumn
(
SALES_DB
,
CUSTOMER_DIM_TABLE
,
NAME_COLUMN
,
"string"
,
"customer name"
,
PII_CLASSIFICATION
),
createColumn
(
ADDRESS_COLUMN
,
"string"
,
"customer address"
,
PII_CLASSIFICATION
)),
createColumn
(
SALES_DB
,
CUSTOMER_DIM_TABLE
,
ADDRESS_COLUMN
,
"string"
,
"customer address"
,
PII_CLASSIFICATION
)),
DIMENSION_CLASSIFICATION
);
DIMENSION_CLASSIFICATION
);
AtlasEntity
timeDim
=
createTable
(
TIME_DIM_TABLE
,
"time dimension table"
,
salesDB
,
"John Doe"
,
EXTERNAL_TABLE
,
AtlasEntity
timeDim
=
createTable
(
TIME_DIM_TABLE
,
"time dimension table"
,
salesDB
,
"John Doe"
,
EXTERNAL_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
SALES_DB
,
TIME_DIM_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
DAY_OF_YEAR_COLUMN
,
"int"
,
"day Of Year"
),
createColumn
(
SALES_DB
,
TIME_DIM_TABLE
,
DAY_OF_YEAR_COLUMN
,
"int"
,
"day Of Year"
),
createColumn
(
WEEKDAY_COLUMN
,
"int"
,
"week Day"
)),
createColumn
(
SALES_DB
,
TIME_DIM_TABLE
,
WEEKDAY_COLUMN
,
"int"
,
"week Day"
)),
DIMENSION_CLASSIFICATION
);
DIMENSION_CLASSIFICATION
);
AtlasEntity
loggingFactDaily
=
createTable
(
LOG_FACT_DAILY_MV_TABLE
,
"log fact daily materialized view"
,
logDB
,
"Tim ETL"
,
MANAGED_TABLE
,
AtlasEntity
loggingFactDaily
=
createTable
(
LOG_FACT_DAILY_MV_TABLE
,
"log fact daily materialized view"
,
logDB
,
"Tim ETL"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
LOGGING_DB
,
LOG_FACT_DAILY_MV_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
APP_ID_COLUMN
,
"int"
,
"app id"
),
createColumn
(
LOGGING_DB
,
LOG_FACT_DAILY_MV_TABLE
,
APP_ID_COLUMN
,
"int"
,
"app id"
),
createColumn
(
MACHINE_ID_COLUMN
,
"int"
,
"machine id"
),
createColumn
(
LOGGING_DB
,
LOG_FACT_DAILY_MV_TABLE
,
MACHINE_ID_COLUMN
,
"int"
,
"machine id"
),
createColumn
(
LOG_COLUMN
,
"string"
,
"log data"
,
LOGDATA_CLASSIFICATION
)),
createColumn
(
LOG
GING_DB
,
LOG_FACT_DAILY_MV_TABLE
,
LOG
_COLUMN
,
"string"
,
"log data"
,
LOGDATA_CLASSIFICATION
)),
LOGDATA_CLASSIFICATION
);
LOGDATA_CLASSIFICATION
);
AtlasEntity
loggingFactMonthly
=
createTable
(
LOG_FACT_MONTHLY_MV_TABLE
,
"logging fact monthly materialized view"
,
logDB
,
"Tim ETL"
,
MANAGED_TABLE
,
AtlasEntity
loggingFactMonthly
=
createTable
(
LOG_FACT_MONTHLY_MV_TABLE
,
"logging fact monthly materialized view"
,
logDB
,
"Tim ETL"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
LOGGING_DB
,
LOG_FACT_MONTHLY_MV_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
APP_ID_COLUMN
,
"int"
,
"app id"
),
createColumn
(
LOGGING_DB
,
LOG_FACT_MONTHLY_MV_TABLE
,
APP_ID_COLUMN
,
"int"
,
"app id"
),
createColumn
(
MACHINE_ID_COLUMN
,
"int"
,
"machine id"
),
createColumn
(
LOGGING_DB
,
LOG_FACT_MONTHLY_MV_TABLE
,
MACHINE_ID_COLUMN
,
"int"
,
"machine id"
),
createColumn
(
LOG_COLUMN
,
"string"
,
"log data"
,
LOGDATA_CLASSIFICATION
)),
createColumn
(
LOG
GING_DB
,
LOG_FACT_MONTHLY_MV_TABLE
,
LOG
_COLUMN
,
"string"
,
"log data"
,
LOGDATA_CLASSIFICATION
)),
LOGDATA_CLASSIFICATION
);
LOGDATA_CLASSIFICATION
);
AtlasEntity
salesFactDaily
=
createTable
(
SALES_FACT_DAILY_MV_TABLE
,
"sales fact daily materialized view"
,
reportingDB
,
"Joe BI"
,
MANAGED_TABLE
,
AtlasEntity
salesFactDaily
=
createTable
(
SALES_FACT_DAILY_MV_TABLE
,
"sales fact daily materialized view"
,
reportingDB
,
"Joe BI"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
REPORTING_DB
,
SALES_FACT_DAILY_MV_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
REPORTING_DB
,
SALES_FACT_DAILY_MV_TABLE
,
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
REPORTING_DB
,
SALES_FACT_DAILY_MV_TABLE
,
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
SALES_COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
createColumn
(
REPORTING_DB
,
SALES_FACT_DAILY_MV_TABLE
,
SALES_COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
METRIC_CLASSIFICATION
);
METRIC_CLASSIFICATION
);
AtlasEntity
salesFactMonthly
=
createTable
(
SALES_FACT_MONTHLY_MV_TABLE
,
"sales fact monthly materialized view"
,
reportingDB
,
"Jane BI"
,
MANAGED_TABLE
,
AtlasEntity
salesFactMonthly
=
createTable
(
SALES_FACT_MONTHLY_MV_TABLE
,
"sales fact monthly materialized view"
,
reportingDB
,
"Jane BI"
,
MANAGED_TABLE
,
Arrays
.
asList
(
createColumn
(
TIME_ID_COLUMN
,
"int"
,
"time id"
),
Arrays
.
asList
(
createColumn
(
REPORTING_DB
,
SALES_FACT_MONTHLY_MV_TABLE
,
TIME_ID_COLUMN
,
"int"
,
"time id"
),
createColumn
(
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
REPORTING_DB
,
SALES_FACT_MONTHLY_MV_TABLE
,
PRODUCT_ID_COLUMN
,
"int"
,
"product id"
),
createColumn
(
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
REPORTING_DB
,
SALES_FACT_MONTHLY_MV_TABLE
,
CUSTOMER_ID_COLUMN
,
"int"
,
"customer id"
,
PII_CLASSIFICATION
),
createColumn
(
SALES_COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
createColumn
(
REPORTING_DB
,
SALES_FACT_MONTHLY_MV_TABLE
,
SALES_COLUMN
,
"double"
,
"product id"
,
METRIC_CLASSIFICATION
)),
METRIC_CLASSIFICATION
);
METRIC_CLASSIFICATION
);
// View entities
// View entities
...
@@ -503,12 +503,12 @@ public class QuickStartV2 {
...
@@ -503,12 +503,12 @@ public class QuickStartV2 {
return
ret
;
return
ret
;
}
}
AtlasEntity
createColumn
(
String
n
ame
,
String
dataType
,
String
comment
,
String
...
classificationNames
)
{
AtlasEntity
createColumn
(
String
databaseName
,
String
tableName
,
String
columnN
ame
,
String
dataType
,
String
comment
,
String
...
classificationNames
)
{
AtlasEntity
ret
=
new
AtlasEntity
(
COLUMN_TYPE
);
AtlasEntity
ret
=
new
AtlasEntity
(
COLUMN_TYPE
);
// set attributes
// set attributes
ret
.
setAttribute
(
"name"
,
n
ame
);
ret
.
setAttribute
(
"name"
,
columnN
ame
);
ret
.
setAttribute
(
REFERENCEABLE_ATTRIBUTE_NAME
,
n
ame
+
CLUSTER_SUFFIX
);
ret
.
setAttribute
(
REFERENCEABLE_ATTRIBUTE_NAME
,
databaseName
+
"."
+
tableName
+
"."
+
columnN
ame
+
CLUSTER_SUFFIX
);
ret
.
setAttribute
(
"dataType"
,
dataType
);
ret
.
setAttribute
(
"dataType"
,
dataType
);
ret
.
setAttribute
(
"comment"
,
comment
);
ret
.
setAttribute
(
"comment"
,
comment
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment