Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommydangerous/8a154269818cdce996fcff9946de4384 to your computer and use it in GitHub Desktop.
Save tommydangerous/8a154269818cdce996fcff9946de4384 to your computer and use it in GitHub Desktop.
from deltalake.writer import write_deltalake
@data_exporter
def export_data(combined_data, *args, **kwargs):
write_deltalake(
# Change this URI to your own unique URI
's3://mage-demo-public/magic-energy-and-battle-history/1337',
data=combined_data,
mode='overwrite',
overwrite_schema=True,
storage_options={
'AWS_REGION': '...',
'AWS_ACCESS_KEY_ID': '...',
'AWS_SECRET_ACCESS_KEY': '...',
'AWS_S3_ALLOW_UNSAFE_RENAME': 'true',
},
partition_by=['planet'],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment