Questions tagged [joiner]

An object which joins pieces of text (specified as an array, Iterable, varargs or even a Map) with a separator. It either appends the results to an Appendable or returns them as a String.

16 questions
5
votes
1 answer

How can I use Joiner, to join only specific properties?

Let's say I have this class: public class MyClass { private String propertyOne; private String propertyTwo; // getters setters... } Now, in my test method, I am trying something like: List myList = myListDao.findAll(); String…
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
4
votes
4 answers

Join strings with different separators in Java

I have a list of strings, e.g. days of the week. And I'd like to join them on comma, with "and" before the last element. E.g: "I'm available on Tue, Wed, Thu and Fri". Something elegant like Joiner.on(", ").join(days) Does not work. Is there an…
Scott Mayers
  • 437
  • 6
  • 18
3
votes
2 answers

Java 7 - String Joiner & add method

I want to iterate through an array and only add the string to the new string if certain conditions are matched, and then seperate with a comma. IF I could use java 8 it would look like this: StringJoiner col = new StringJoiner(","); StringJoiner…
Al Grant
  • 2,102
  • 1
  • 26
  • 49
2
votes
1 answer

Getting Caused by: java.util.NoSuchElementException: None.get error when I use aggregate before stream-static join in structured streaming

import org.apache.spark._ import org.apache.spark.rdd._ import org.apache.spark.storage.StorageLevel._ import org.apache.spark.sql._ import org.apache.spark.sql.types._ import org.apache.spark.sql.functions._ import org.apache.spark.sql.functions.{…
1
vote
1 answer

Why does guava joiner implement a private method iterable(final Object first, final Object second, final Object[] rest)?

private static Iterable iterable( final Object first, final Object second, final Object[] rest) { checkNotNull(rest); return new AbstractList() { @Override public int size() { return…
aoyuan zhu
  • 57
  • 6
1
vote
1 answer

Using enumset in Guava's joiner

I am working on converting an enumset into a string of values that are in the enumset. At the moment, I am using Joiner.on(',').join(enumset)) to create a string of values. However, I am wondering what are the ordering guarantees that enumset…
gmemon
  • 2,573
  • 5
  • 32
  • 37
1
vote
1 answer

Is it possible to apply joiner (collector, accumulator) over function using Java Guava?

Is it possible to collect Strings over collection while grouping? That's how it works in Java 8: Map discountOptions = p.getDiscountOptions().Stream() .collect(groupingBy( this::getDiscountName, …
max_dev
  • 554
  • 2
  • 6
  • 15
1
vote
3 answers

Number of records using normal joiner in informatica

I have a master table with one record: employee Id ----------- 10 and detail table with 4 records: employee Id1 ----------- 10 20 10 10 My join condition is employee Id = employee Id1 with normal join type. My question is which of the following…
aram
  • 71
  • 1
  • 10
1
vote
2 answers

Joiner not ordering correctly?

I have the following code to to run Joiner to concat keys. However, they show up out of order. BiMap whatever= HashBiMap.create(); { whatever.put("First group", "f1"); whatever.put("This should really be…
genxgeek
  • 13,109
  • 38
  • 135
  • 217
0
votes
2 answers

joiner transformation query

I have Flat File1 (F1) with these columns - key1, col1, col2 Flat File2 (F2) with these columns - key2, col1, col2 and one table (T1) with these columns - key3, col1, col2 Requirement is to get data from all 3 sources based on the below checks…
exp post
  • 23
  • 2
0
votes
1 answer

How to join three heterogeneous sources using single joiner

How to join three heterogeneous sources using single joiner sources? Maybe three flat files, references three different relational databases (Oracle, Teradata, SQL server) tables or one flat file, one oracle table, and one SQL server table. We need…
0
votes
0 answers

Joiner Transformation in Informatica PowerCenter - Trouble in joining duplicate values from source with target

I have following scenario Source 1: Category_DTL Category_ID Date Value 1 20180101 10 1 20180110 12 2 20180101 14 3 20180101 15 4 20180101 10 Source 2: Category_Master Category_ID …
0
votes
1 answer

Error at com.google.common.base.Joiner.on()

java.lang.NullPointerException: null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) ~[spigot-1.12.2.jar:git-Spigot-c3093ef-7e94e65] at com.google.common.base.Joiner.toString(Joiner.java:454)…
Sage M
  • 119
  • 1
  • 2
  • 9
0
votes
2 answers

Not allowed to use Joiner transformation

I have an expression transformation from which I am passing the data to two different transformations. Later in the downstream of these parallel flows, I am trying to apply a joiner transformation but I am not allowed to do so., Is joiner…
0
votes
2 answers

How to join two tables in informatica without using JOINER transformation?

If we use Joiner , then it is taking to much time. We have table A and Flat file B. A table has following fields Name , DEPT, SALARY. File B has following fields NAME and DEPT. We have to match the NAME in between table and file B and update DEPT…
1
2