felipe_souto_campelo
07/21/2023, 4:11 PMschema = th.PropertiesList(
th.Property("workspaceId", th.StringType),
th.Property("timestamp", th.StringType),
th.Property("clusterId", th.StringType),
th.Property("clusterName", th.StringType),
th.Property("clusterNodeType", th.StringType),
th.Property("clusterOwnerUserId", th.StringType),
th.Property("clusterCustomTags", th.StringType),
th.Property("sku", th.StringType),
th.Property("dbus", th.StringType),
th.Property("machineHours", th.StringType),
th.Property("clusterOwnerUserName", th.StringType),
th.Property("tags", th.StringType)
).to_dict()
But I end up getting the following error:
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Here is the link to the enpoint: https://docs.databricks.com/api/account/billableusage/downloadedgar_ramirez_mondragon
07/21/2023, 4:36 PMimport csv
class BillableUsage(DatabricksStream):
def parse_response(self, response):
csv_lines = response.text.splitlines()
csv_reader = csv.DictReader(csv_lines)
yield from csv_reader
felipe_souto_campelo
07/21/2023, 4:47 PMedgar_ramirez_mondragon
07/21/2023, 5:17 PMfelipe_souto_campelo
07/21/2023, 5:18 PMfelipe_souto_campelo
07/21/2023, 5:19 PMedgar_ramirez_mondragon
07/21/2023, 5:22 PMmeltano invoke tap-databricksbilling > databricks.singer.jsonl
And inspect the file contents looking for a line that's not valid JSON (maybe you're `print`ing somewhere in your tap?felipe_souto_campelo
07/21/2023, 5:30 PMuser
07/21/2023, 5:31 PMmeltano invoke tap-databricksbilling --discover > catalog.json
felipe_souto_campelo
07/21/2023, 5:45 PM2023-07-21T17:42:53.279677Z [info ] properties_dict = self.schema["properties"] cmd_type=elb consumer=True name=target-s3 producer=False stdio=stderr string_id=target-s3
2023-07-21T17:42:53.279780Z [info ] KeyError: 'properties' cmd_type=elb consumer=True name=target-s3 producer=False stdio=stderr string_id=target-s3
user
07/21/2023, 5:47 PMfelipe_souto_campelo
07/21/2023, 5:49 PMedgar_ramirez_mondragon
07/21/2023, 8:44 PM.meltano/run/tap-databricksbilling/tap.properties.json
to see if it's valid JSONfelipe_souto_campelo
07/21/2023, 10:06 PMfelipe_souto_campelo
07/24/2023, 12:14 PM