Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interesting idea #1

Open
pycal opened this issue Jun 20, 2024 · 2 comments
Open

Interesting idea #1

pycal opened this issue Jun 20, 2024 · 2 comments
Assignees

Comments

@pycal
Copy link

pycal commented Jun 20, 2024

Hey @asuiu , I think this is a very interesting idea and attractive for a project I'm managing.

I'd be interested to know if you have plans to implement the various MigrationStrategies?

Also I was taking a look at some examples and if I'm not mistaken, in 1.2.24 some are no longer working because of recent changes (unless I'm mistaken?) Can you let me know if I should be able to do this?

from sparkorm import Struct

e.g. https://github.com/asuiu/SparkORM/blob/master/examples/conferences_extended/conferences.py#L3

@asuiu asuiu self-assigned this Jun 21, 2024
@asuiu
Copy link
Owner

asuiu commented Jun 21, 2024

Hi!
You are right, the from sparkorm import Struct doesn't work due to not exported Struct in the init.
I have fixed this, and the example should work now, in the version 1.2.25, uploaded on PyPi as well.

Yes, I have plans to implement more MigrationStrategies. Do you have any specific examples in mind?

@pycal
Copy link
Author

pycal commented Jun 21, 2024

Nice.

Yes, I have a couple concrete use cases for migration strategies right now actually!

The simplest is "add new column to existing schema."

The other immediate use is "modify existing column type, given a specified cast":

  • Simple example would be "cast IntegerType to DoubleType"
  • More complex example would be "cast LongType epoch in usecs to TimestampType"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants