OHDSI Home | Forums | Wiki | Github

AVRO Generation/Download

Does anyone know of any easy ways to generate/download the AVRO for OMOP tables?

We use a python script (within DataBricks) to take our OMOP tables (in parquet) and generate AVRO output files to Azure blob storage. Here is a code snippet for one table.

outfile = 'wasbs://avro-export@BLOBNAME.blob.core.windows.net/ohdsi/measurement'
df = spark.sql('SELECT * FROM ohdsi.measurement')
df.write.format('avro').save(outfile)
1 Like
t