diff --git a/pom.xml b/pom.xml
index b737e5a..1fc51d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,7 @@
2.0.171.6
+ 0.32.02.13.233.5.0-jre2.41.32
@@ -106,6 +107,12 @@
+
+ org.netpreserve
+ jwarc
+ ${jwarc.version}
+
+
diff --git a/src/main/java/org/commoncrawl/spark/GAWTableConverter.java b/src/main/java/org/commoncrawl/spark/GAWTableConverter.java
new file mode 100644
index 0000000..5b25e6c
--- /dev/null
+++ b/src/main/java/org/commoncrawl/spark/GAWTableConverter.java
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commoncrawl.spark;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.time.ZonedDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.spark.SparkConf;
+import org.apache.spark.api.java.JavaRDD;
+import org.apache.spark.api.java.function.Function;
+import org.apache.spark.sql.Column;
+import org.apache.spark.sql.DataFrameReader;
+import org.apache.spark.sql.DataFrameWriter;
+import org.apache.spark.sql.Dataset;
+import org.apache.spark.sql.Row;
+import org.apache.spark.sql.RowFactory;
+import org.apache.spark.sql.SparkSession;
+import org.commoncrawl.net.HostName;
+import org.commoncrawl.net.WarcUri;
+import org.netpreserve.jwarc.URIs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GAWTableConverter extends IndexTable {
+
+ private static final Logger LOG = LoggerFactory.getLogger(GAWTableConverter.class);
+ protected String name = GAWTableConverter.class.getCanonicalName();
+
+ public static Row convertRow(Row inp) {
+ try {
+ String url = inp.getString(0);
+ String timeStampString = inp.getString(1);
+ ZonedDateTime fetchTime = fetchTimeParser.parse(timeStampString, ZonedDateTime::from);
+ Timestamp timestamp = Timestamp.from(fetchTime.toInstant());
+ WarcUri uri = new WarcUri(url);
+ HostName host = uri.getHostName();
+ Row h = host.asRow();
+ List