Skip to content

Conversation

@souravbaner-da
Copy link
Contributor

Close #858

GeekSheikh and others added 16 commits March 6, 2023 12:19
* initial commit

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Change Scala Sources Name

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Added Initializerv2.scala

* Added Initializerv2.scala

* Changed as per Sriram comment

* Changed as per Sriram comment

* dropped Initializer Deprecated

---------

Co-authored-by: geeksheikh <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Daniel Tomes <[email protected]>
* initial commit

* Refractor Initializer (#683)

* initial commit

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Change Scala Sources Name

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Added Initializerv2.scala

* Added Initializerv2.scala

* Changed as per Sriram comment

* Changed as per Sriram comment

* dropped Initializer Deprecated

---------

Co-authored-by: geeksheikh <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Daniel Tomes <[email protected]>

* Change Job Trigger type to Triggered

* Change Job Trigger type to Triggered

* Change Job Trigger type to Triggered

---------

Co-authored-by: geeksheikh <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Daniel Tomes <[email protected]>
* initial commit

* Refractor Initializer (#683)

* initial commit

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Change Scala Sources Name

* Refractor InitializerFunctions.scala

* Refractor InitializerFunctions.scala

* Added Initializerv2.scala

* Added Initializerv2.scala

* Changed as per Sriram comment

* Changed as per Sriram comment

* dropped Initializer Deprecated

---------

Co-authored-by: geeksheikh <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Daniel Tomes <[email protected]>

* gcp integration added

* gcp integration added

* minor updates from daniel

* review comment implemented

---------

Co-authored-by: geeksheikh <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Sourav Banerjee <[email protected]>
Co-authored-by: Daniel Tomes <[email protected]>
* conde changes completed

* column name changed from etl_storage_prefix to storage prefix

---------

Co-authored-by: geeksheikh <[email protected]>
* code changes completed

* code changes completed

* code changes completed

* code changes completed
* initial 0713 commit

* handled null AccumUpates
@souravbaner-da souravbaner-da added the bug Something isn't working label Apr 3, 2023
@souravbaner-da souravbaner-da added this to the 0.7.2.0 milestone Apr 3, 2023
@souravbaner-da souravbaner-da self-assigned this Apr 3, 2023
@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@souravbaner-da souravbaner-da linked an issue Apr 3, 2023 that may be closed by this pull request
@GeekSheikh
Copy link
Contributor

GeekSheikh commented Apr 5, 2023

@souravbaner-da -- test is failing

describe("Tests for initialize database") {
ignore ("initializeDatabase function should create both elt and consumer database") {
import spark.implicits._
val conf = new Config
conf.setDatabaseNameAndLoc("overwatch_etl", "file:/src/test/resources/overwatch/spark-warehouse/overwatch_etl.db", "file:/src/test/resources/overwatch/spark-warehouse/overwatch.db")
conf.setConsumerDatabaseNameandLoc("overwatch", "file:/src/test/resources/overwatch/spark-warehouse/overwatch.db")
val init = new Initializer(conf)
val database = PrivateMethod[Database]('initializeDatabase)
init invokePrivate database()
val databases = spark.sql("show databases").select("namespace").map(f => f.getString(0)).collect()
assert(databases.contains("overwatch_etl"))
assert(databases.contains("overwatch"))
}
}

it("dataTargetIsValid function should throw exception when the current db location is different than the one present already") {
val dataTarget = DataTarget(Some("overwatch_etl"),Some("/path/to/database"), Some("/path/prefix"), Some("overwatch"), Some("/path/to/consumer_database"))
spark.sql("create database if not exists overwatch_etl")
val conf = new Config
val init = new Initializer(conf)
val dataTargetIsValid = PrivateMethod[Boolean]('dataTargetIsValid)
assertThrows[BadConfigException](init invokePrivate dataTargetIsValid(dataTarget))
}

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@souravbaner-da
Copy link
Contributor Author

Currently this issue will be on hold. As the suggested solution depend on spark version. Specifically from spark version 3.3.0 the solution is working fine and for all other version the solution is failing.
Only solution for this is to check spark version during the check of database exist and build our solution depend on the spark version.
May be look into it in future release.

For now in overwatch public doc we will mention that database name in config should not contain any special character. Corresponding PR for the documentation is
#875

@GeekSheikh GeekSheikh modified the milestones: 0.7.2.0, 0.7.3.0 Apr 11, 2023
@gueniai gueniai modified the milestones: 0.7.3.0, 0.7.2.1 Apr 25, 2023
@souravbaner-da
Copy link
Contributor Author

Currently this PR is on hold. Will start working on this after we are done with below issue #858

@GeekSheikh GeekSheikh modified the milestones: 0.7.2.1, 0.7.3.0 Jun 19, 2023
@gueniai gueniai changed the title Change dbname declartion in spark.catalog.exists Change dbname declaration in spark.catalog.exists Aug 10, 2023
@gueniai gueniai modified the milestones: 0.7.3.0, backlog Aug 10, 2023
@CLAassistant
Copy link

CLAassistant commented Nov 27, 2023

CLA assistant check
All committers have signed the CLA.

@gueniai gueniai removed this from the backlog milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] OW fails when ETL DB name has a hyphen

8 participants