Skip to content

Commit

Permalink
Fixed RD-14987: Discard hidden columns (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaidioz authored Oct 15, 2024
1 parent 573aabc commit cbda77d
Show file tree
Hide file tree
Showing 24 changed files with 3,497 additions and 4,470 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,96 +19,80 @@ class DASSalesforceAccountContactRoleTable(connector: DASSalesforceConnector)
extends DASSalesforceTable(connector, "salesforce_account_contact_role", "AccountContactRole") {

override def tableDefinition: TableDefinition = {
var tbl = TableDefinition
val tbl = TableDefinition
.newBuilder()
.setTableId(TableId.newBuilder().setName(tableName))
.setDescription(
"Represents the role that a Contact plays on an Account."
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("id")
.setDescription("Unique identifier of the account contact role in Salesforce.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("account_id")
.setDescription("Unique identifier of the account contact role in Salesforce.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("contact_id")
.setDescription("ID of the Contact associated with this account.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("is_primary")
.setDescription(
"Specifies whether the Contact plays the primary role on the Account (true) or not (false). Note that each account has only one primary contact role."
)
.setType(Type.newBuilder().setBool(BoolType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("role")
.setDescription(
"Name of the role played by the Contact on this Account, such as Decision Maker, Approver, Buyer, and so on."
)
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("created_by_id")
.setDescription("The id of the user who created the account.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("created_date")
.setDescription("The creation date and time of the account contact role.")
.setType(
Type.newBuilder().setTimestamp(TimestampType.newBuilder().setTriable(false).setNullable(true)).build()
)
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("last_modified_by_id")
.setDescription(
"Id of the user who most recently changed the contact role record."
)
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build()
)
.addColumns(
ColumnDefinition
.newBuilder()
.setName("last_modified_date")
.setDescription("Date of most recent change in the contact role record.")
.setType(
Type.newBuilder().setTimestamp(TimestampType.newBuilder().setTriable(false).setNullable(true)).build()
)
.build()
)
.setStartupCost(1000)
tbl = addDynamicColumns(tbl)
val columns = Seq(
ColumnDefinition
.newBuilder()
.setName("id")
.setDescription("Unique identifier of the account contact role in Salesforce.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("account_id")
.setDescription("Unique identifier of the account contact role in Salesforce.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("contact_id")
.setDescription("ID of the Contact associated with this account.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("is_primary")
.setDescription(
"Specifies whether the Contact plays the primary role on the Account (true) or not (false). Note that each account has only one primary contact role."
)
.setType(Type.newBuilder().setBool(BoolType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("role")
.setDescription(
"Name of the role played by the Contact on this Account, such as Decision Maker, Approver, Buyer, and so on."
)
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("created_by_id")
.setDescription("The id of the user who created the account.")
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("created_date")
.setDescription("The creation date and time of the account contact role.")
.setType(
Type.newBuilder().setTimestamp(TimestampType.newBuilder().setTriable(false).setNullable(true)).build()
)
.build(),
ColumnDefinition
.newBuilder()
.setName("last_modified_by_id")
.setDescription(
"Id of the user who most recently changed the contact role record."
)
.setType(Type.newBuilder().setString(StringType.newBuilder().setTriable(false).setNullable(true)).build())
.build(),
ColumnDefinition
.newBuilder()
.setName("last_modified_date")
.setDescription("Date of most recent change in the contact role record.")
.setType(
Type.newBuilder().setTimestamp(TimestampType.newBuilder().setTriable(false).setNullable(true)).build()
)
.build()
)
fixHiddenAndDynamicColumns(columns).foreach(tbl.addColumns)
tbl.setStartupCost(1000)
tbl.build()
}

Expand Down
Loading

0 comments on commit cbda77d

Please sign in to comment.