Last active
May 9, 2023 23:46
-
-
Save tommydangerous/470ed247a6c503ef04ba978723fa7930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from deltalake import DeltaTable | |
import pandas as pd | |
@transformer | |
def transform(magic_energy, *args, **kwargs): | |
dt = DeltaTable( | |
# Change this to your unique URI from a previous step | |
# if you’re using your own AWS credentials. | |
's3://mage-demo-public/battle-history/1337', | |
storage_options={ | |
'AWS_ACCESS_KEY_ID': '...', | |
'AWS_SECRET_ACCESS_KEY': '...', | |
}, | |
) | |
battle_history = dt.to_pandas() | |
return pd.concat([magic_energy, battle_history]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment