-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e069529
commit 944e7fc
Showing
3 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- livebook:{"file_entries":[{"name":"sample.edi","type":"attachment"}]} --> | ||
|
||
# Edix | ||
|
||
```elixir | ||
Mix.install([ | ||
{:kino_explorer, "~> 0.1.19"}, | ||
{:edix, path: "/Users/timgremore/dev/edix", version: "~> 0.1.4"} | ||
]) | ||
``` | ||
|
||
## Section | ||
|
||
```elixir | ||
sample_edi_file = Kino.FS.file_path("sample.edi") | ||
``` | ||
|
||
```elixir | ||
{:ok, edix_document} = Edix.parse_edi_file(sample_edi_file) | ||
|
||
edix_map = | ||
edix_document | ||
|> Map.from_struct() | ||
|
||
envelope = | ||
edix_map[:envelope] | ||
|> Enum.map(&Map.from_struct/1) | ||
|> dbg() | ||
|
||
edix_map = Map.put(edix_map, :envelope, envelope) | ||
|
||
Explorer.DataFrame.new([edix_map]) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
ISA*00* *00* *08*915792US00 *02*8TMW *240429*0614*:*00501*204299166*0*P*>~ | ||
GS*SM*915792US00*8TMW*20240429*0614*204299166*X*005010~ | ||
ST*204*0001~ | ||
B2**8TMW**34029920**CC~ | ||
B2A*00*LT~ | ||
L11*0*ACB~ | ||
G62*64*20240429*1*080800*CT~ | ||
NTE**No Comments~ | ||
N1*OB*Sample Inc*UL*0012842000008~ | ||
N7*WM*0*********TF****5300~ | ||
S5*1*CL***0*DH~ | ||
L11*4208105*P8~ | ||
G62*10*20240503~ | ||
AT5**ZZ~ | ||
N1*SF*FIVE STARS WAREHOUSE*93*4208105~ | ||
N3*150 RIDGE ROAD~ | ||
N4*DAYTON*NJ*08810~ | ||
G61*IC*MOUNIR*TE*7323290791~ | ||
G61*IC*MOUNIR*EM*[email protected]~ | ||
OID*20*5060796996*34*CAS*341*L*2573*E*1340~ | ||
G62*01*20240503~ | ||
OID*20*1079154378*23*CAS*724*L*3076*E*1340~ | ||
G62*01*20240508~ | ||
S5*2*CU***658*DH~ | ||
L11*26692139*AO~ | ||
G62*78*20240505*3*000000*ET~ | ||
AT8*G*L*5649*1065**E*2680~ | ||
N1*ST*DC 6014*UL*0078742028927~ | ||
N3*1050 VERN CORA RD~ | ||
N4*LAURENS*SC*29360~ | ||
OID*20*5060796996*34*CAS*341*L*2573*E*1340~ | ||
G62*01*20240503~ | ||
OID*20*1079154378*23*CAS*724*L*3076*E*1340~ | ||
G62*01*20240508~ | ||
L3*5649*G*1006.74*PM*100674****2680*E*1065~ | ||
SE*34*0001~ | ||
GE*1*204299166~ | ||
IEA*1*204299166~ |