|
| 1 | +@GCS_Sink |
| 2 | +Feature: GCS sink - Verification of GCS Sink plugin macro scenarios |
| 3 | + |
| 4 | + @BQ_SOURCE_DATATYPE_TEST @GCS_SINK_TEST |
| 5 | + Scenario:Validate successful records transfer from BigQuery to GCS sink with macro fields |
| 6 | + Given Open Datafusion Project to configure pipeline |
| 7 | + Then Select plugin: "BigQuery" from the plugins list as: "Source" |
| 8 | + When Expand Plugin group in the LHS plugins list: "Sink" |
| 9 | + When Select plugin: "GCS" from the plugins list as: "Sink" |
| 10 | + Then Open BigQuery source properties |
| 11 | + Then Enter BigQuery property reference name |
| 12 | + Then Enter BigQuery property projectId "projectId" |
| 13 | + Then Enter BigQuery property datasetProjectId "projectId" |
| 14 | + Then Override Service account details if set in environment variables |
| 15 | + Then Enter BigQuery property dataset "dataset" |
| 16 | + Then Enter BigQuery source property table name |
| 17 | + Then Validate output schema with expectedSchema "bqSourceSchemaDatatype" |
| 18 | + Then Validate "BigQuery" plugin properties |
| 19 | + Then Close the BigQuery properties |
| 20 | + Then Open GCS sink properties |
| 21 | + Then Override Service account details if set in environment variables |
| 22 | + Then Enter the GCS sink mandatory properties |
| 23 | + Then Enter GCS property "projectId" as macro argument "gcsProjectId" |
| 24 | + Then Enter GCS property "serviceAccountType" as macro argument "serviceAccountType" |
| 25 | + Then Enter GCS property "serviceAccountFilePath" as macro argument "serviceAccount" |
| 26 | + Then Enter GCS property "path" as macro argument "gcsSinkPath" |
| 27 | + Then Enter GCS sink property "pathSuffix" as macro argument "gcsPathSuffix" |
| 28 | + Then Enter GCS property "format" as macro argument "gcsFormat" |
| 29 | + Then Click on the Macro button of Property: "writeHeader" and set the value to: "WriteHeader" |
| 30 | + Then Click on the Macro button of Property: "location" and set the value to: "gcsSinkLocation" |
| 31 | + Then Click on the Macro button of Property: "contentType" and set the value to: "gcsContentType" |
| 32 | + Then Click on the Macro button of Property: "outputFileNameBase" and set the value to: "OutFileNameBase" |
| 33 | + Then Click on the Macro button of Property: "fileSystemProperties" and set the value to: "FileSystemPr" |
| 34 | + Then Validate "GCS" plugin properties |
| 35 | + Then Close the GCS properties |
| 36 | + Then Connect source as "BigQuery" and sink as "GCS" to establish connection |
| 37 | + Then Save the pipeline |
| 38 | + Then Preview and run the pipeline |
| 39 | + Then Enter runtime argument value "projectId" for key "gcsProjectId" |
| 40 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 41 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 42 | + Then Enter runtime argument value for GCS sink property path key "gcsSinkPath" |
| 43 | + Then Enter runtime argument value "gcsPathDateSuffix" for key "gcsPathSuffix" |
| 44 | + Then Enter runtime argument value "jsonFormat" for key "gcsFormat" |
| 45 | + Then Enter runtime argument value "writeHeader" for key "WriteHeader" |
| 46 | + Then Enter runtime argument value "contentType" for key "gcsContentType" |
| 47 | + Then Enter runtime argument value "gcsSinkBucketLocation" for key "gcsSinkLocation" |
| 48 | + Then Enter runtime argument value "outputFileNameBase" for key "OutFileNameBase" |
| 49 | + Then Enter runtime argument value "gcsCSVFileSysProperty" for key "FileSystemPr" |
| 50 | + Then Run the preview of pipeline with runtime arguments |
| 51 | + Then Wait till pipeline preview is in running state |
| 52 | + Then Open and capture pipeline preview logs |
| 53 | + Then Verify the preview run status of pipeline in the logs is "succeeded" |
| 54 | + Then Close the pipeline logs |
| 55 | + Then Click on preview data for GCS sink |
| 56 | + Then Verify preview output schema matches the outputSchema captured in properties |
| 57 | + Then Close the preview data |
| 58 | + Then Deploy the pipeline |
| 59 | + Then Run the Pipeline in Runtime |
| 60 | + Then Enter runtime argument value "projectId" for key "gcsProjectId" |
| 61 | + Then Enter runtime argument value "serviceAccountType" for key "serviceAccountType" |
| 62 | + Then Enter runtime argument value "serviceAccount" for key "serviceAccount" |
| 63 | + Then Enter runtime argument value for GCS sink property path key "gcsSinkPath" |
| 64 | + Then Enter runtime argument value "gcsPathDateSuffix" for key "gcsPathSuffix" |
| 65 | + Then Enter runtime argument value "jsonFormat" for key "gcsFormat" |
| 66 | + Then Enter runtime argument value "writeHeader" for key "WriteHeader" |
| 67 | + Then Enter runtime argument value "contentType" for key "gcsContentType" |
| 68 | + Then Enter runtime argument value "gcsSinkBucketLocation" for key "gcsSinkLocation" |
| 69 | + Then Enter runtime argument value "outputFileNameBase" for key "OutFileNameBase" |
| 70 | + Then Enter runtime argument value "gcsCSVFileSysProperty" for key "FileSystemPr" |
| 71 | + Then Run the Pipeline in Runtime with runtime arguments |
| 72 | + Then Wait till pipeline is in running state |
| 73 | + Then Open and capture logs |
| 74 | + Then Verify the pipeline status is "Succeeded" |
| 75 | + Then Verify data is transferred to target GCS bucket |
| 76 | + Then Validate the values of records transferred to GCS bucket is equal to the values from source BigQuery table |
0 commit comments