Hi folks, beginner question (I think). I'm creatin...
# general
n
Hi folks, beginner question (I think). I'm creating a saved search to export Transactions to a CSV to ingest into a BI tool. I need a unique identifier per transaction, and thought that's what the Internal ID field was. However, the exported CSV includes many rows where the Internal ID is repeated. What's the correct way to get a unique identifier for each transaction?
c
Your saved search is returning one row per transaction line which means that many "body" fields will be repeated for every row. This doesn't mean you have duplicate internal IDs. It's a result of flattening multi-dimensional data set into two dimensions.
👍 1
s
If you just want header level data to send to BI tool, change the criteria to mainline = T, this will remove line level data. If you want line level data (most people do), then you need to use something else like line unique id.
n
That makes sense, these are definitely transaction lines and I do want that data
@Sandii Silly question, do lines actually have a field called
line unique ID
or do you have to piece it together from something else?
s
line unique key
is in there
Also adding Mainline to your results will give you a differentiator between the header data and the line data in the BI tool (header data has a
*
to indicate it is 'mainline')
n
Gotcha, that is super helpful. By adding Mainline you mean as a field, not
mainline=T
right?
s
Yeah mainline to your results gives a column that has
*
when the data is header, and blank when it is not
Depending on what you want in the dataset going to BI tool, you can put criteria on there that makes the column obsolete, or just leave both and filter in the BI tool
n
Makes sense 👍