Skip to content

Commit 2a211cb

Browse files
rashik-bhasinrashik-bhasin
authored andcommitted
Support for Spark 3.0 added in data flow
1 parent 4eb7dfc commit 2a211cb

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Support for Data Safe target database registration
55
- Support for Elastic storage for ExaCC
66
- Support for Migrate VCN status added to container engine
7+
- Support for Spark 3.0 added in data flow
78

89
## 4.30.0 (June 09, 2021)
910

oci/dataflow_application_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ func TestDataflowApplicationResource_basic(t *testing.T) {
287287
resource.TestCheckResourceAttr(datasourceName, "applications.0.language", "SCALA"),
288288
resource.TestCheckResourceAttrSet(datasourceName, "applications.0.owner_principal_id"),
289289
resource.TestCheckResourceAttrSet(datasourceName, "applications.0.owner_user_name"),
290+
resource.TestCheckResourceAttr(datasourceName, "applications.0.spark_version", "2.4.4"),
290291
resource.TestCheckResourceAttrSet(datasourceName, "applications.0.state"),
291292
resource.TestCheckResourceAttrSet(datasourceName, "applications.0.time_created"),
292293
resource.TestCheckResourceAttrSet(datasourceName, "applications.0.time_updated"),

oci/dataflow_applications_data_source.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ func DataflowApplicationsDataSource() *schema.Resource {
3535
Type: schema.TypeString,
3636
Optional: true,
3737
},
38+
"spark_version": {
39+
Type: schema.TypeString,
40+
Optional: true,
41+
},
3842
"applications": {
3943
Type: schema.TypeList,
4044
Computed: true,
@@ -85,6 +89,11 @@ func (s *DataflowApplicationsDataSourceCrud) Get() error {
8589
request.OwnerPrincipalId = &tmp
8690
}
8791

92+
if sparkVersion, ok := s.D.GetOkExists("spark_version"); ok {
93+
tmp := sparkVersion.(string)
94+
request.SparkVersion = &tmp
95+
}
96+
8897
request.RequestMetadata.RetryPolicy = getRetryPolicy(false, "dataflow")
8998

9099
response, err := s.Client.ListApplications(context.Background(), request)
@@ -145,6 +154,10 @@ func (s *DataflowApplicationsDataSourceCrud) SetData() error {
145154
application["owner_user_name"] = *r.OwnerUserName
146155
}
147156

157+
if r.SparkVersion != nil {
158+
application["spark_version"] = *r.SparkVersion
159+
}
160+
148161
application["state"] = r.LifecycleState
149162

150163
if r.TimeCreated != nil {

website/docs/d/dataflow_applications.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_dataflow_applications
1111
This data source provides the list of Applications in Oracle Cloud Infrastructure Data Flow service.
1212

13-
Lists all applications in the specified compartment.
13+
Lists all applications in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned.
1414

1515

1616
## Example Usage
@@ -24,6 +24,7 @@ data "oci_dataflow_applications" "test_applications" {
2424
display_name = var.application_display_name
2525
display_name_starts_with = var.application_display_name_starts_with
2626
owner_principal_id = oci_dataflow_owner_principal.test_owner_principal.id
27+
spark_version = var.application_spark_version
2728
}
2829
```
2930

@@ -35,6 +36,7 @@ The following arguments are supported:
3536
* `display_name` - (Optional) The query parameter for the Spark application name.
3637
* `display_name_starts_with` - (Optional) The displayName prefix.
3738
* `owner_principal_id` - (Optional) The OCID of the user who created the resource.
39+
* `spark_version` - (Optional) The Spark version utilized to run the application.
3840

3941

4042
## Attributes Reference

website/docs/d/dataflow_invoke_runs.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_dataflow_invoke_runs
1111
This data source provides the list of Invoke Runs in Oracle Cloud Infrastructure Data Flow service.
1212

13-
Lists all runs of an application in the specified compartment.
13+
Lists all runs of an application in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned.
1414

1515

1616
## Example Usage

website/docs/r/dataflow_private_endpoint.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# oci_dataflow_private_endpoint
1111
This resource provides the Private Endpoint resource in Oracle Cloud Infrastructure Data Flow service.
1212

13-
Creates a private endpoint to be used by an application.
13+
Creates a private endpoint to be used by applications.
1414

1515

1616
## Example Usage

0 commit comments

Comments
 (0)