Skip to content

Instantly share code, notes, and snippets.

View ayush-poddar's full-sized avatar

Ayush Poddar ayush-poddar

View GitHub Profile
@ayush-poddar
ayush-poddar / WriteFileWithName.java
Last active April 26, 2023 12:41
WordCount GCS with custom output file name
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.io.FileIO;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.*;
import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.TypeDescriptors;
@ayush-poddar
ayush-poddar / repro.py
Created August 27, 2021 05:16
Items are retired indefinitely, even when using `RetryStrategy.RETRY_NEVER` it still keeps retrying failing records
# python main.py --streaming \
# --project=<PROJECT> \
# --topic=projects/pubsub-public-data/topics/taxirides-realtime \
# --runner=DataflowRunner \
# --region=us-central1 \
# --temp_location=<GCS_TEMP_LOCATION> \
# --staging_location=<GCS_STAGING_LOCATION> \
# --table1=<BQ_TABLE1>
# --table2=<BQ_TABLE2>