Powered by AppSignal & Oban Pro

[IM4] import locations

IM4_import_locations.livemd

[IM4] import locations

use QuickAlias, MyAppWeb
use QuickAlias, MyAppBe
use QuickAlias, MyApp
IEx.configure(inspect: [charlists: :as_lists])
require Ash.Query

Section

query =
  MyApp.LegacyLocation
  |> Ash.Query.filter(zip > "1000")
  |> Ash.Query.filter(fragment("length(?) >1", name))
query
|> Api.count()
# query
# # |> Ash.Query.limit(1000)
# |> Ash.Query.sort(id: :desc)
# |> MyApp.Api.read!()
# |> Enum.map(fn a ->   .make_real_location(a) end)
MyApp.Location
|> Ash.Query.filter(esel_legacy_id > 1)
|> Api.count()