Skip to content

Instantly share code, notes, and snippets.

@wmonteiro-ai
Created June 13, 2025 23:18
Show Gist options
  • Select an option

  • Save wmonteiro-ai/d0707210d0045e80631d21aaff65d948 to your computer and use it in GitHub Desktop.

Select an option

Save wmonteiro-ai/d0707210d0045e80631d21aaff65d948 to your computer and use it in GitHub Desktop.
Uploading files to HDFS through PyArrow
# criar arquivos
conexao.create_dir('/SEUNOME.SOBRENOME')
caminho_arquivo_origem = '/home/jovyan/work/sentiment140.csv'
caminho_arquivo_destino = '/SEUNOME.SOBRENOME/sentiment140.csv'
# Copy the file
fs.copy_files(caminho_arquivo_origem, caminho_arquivo_destino, destination_filesystem=conexao)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment