BigQueryHelpers { public static String stripPartitionDecorator(String tableSpec) { int index = tableSpec.lastIndexOf('$'); return (index == -1) ? tableSpec : tableSpec.substring(0, index); }  static String toTableSpec(TableReference ref); static TableReference parseTableSpec(String tableSpec); static String stripPartitionDecorator(String tableSpec); static String toJsonString(Object item); static T fromJsonString(String json, Class<T> clazz); static @Nullable BigInteger getNumRows(BigQueryOptions options, TableReference tableRef);  }
@Test public void testTableDecoratorStripping() { assertEquals( "project:dataset.table", BigQueryHelpers.stripPartitionDecorator("project:dataset.table$20171127")); assertEquals( "project:dataset.table", BigQueryHelpers.stripPartitionDecorator("project:dataset.table")); }