https://dagster.io/ logo
#ask-community
Title
# ask-community
u

0x Puff

08/02/2022, 4:53 AM
Copy code
import json
# import requests
from urllib.request import urlopen
from dagster import asset, get_dagster_logger

@asset
def countries():
  """Master countries source"""
  url = "<http://localhost:5555/countries>"
  response = urlopen(url)
  data_json = json.loads(response.read())
  countries = [x for x in data_json]
  get_dagster_logger().info(f"Found {len(countries)} total countries in upstream dataset ")
  return countries
3 Views