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
# generate a data dictionary from an ArcGIS feature class | |
# tested with ArcGIS Pro/Python3 | |
# Run from command prompt in ArcGIS Pro environment | |
# Takes 2 arguments: 1) path to feature class 2) path for output CSV file | |
# Example: python C:\arcpy_data_dictionary.py C:\yourgeodatabase.gdb\featureclassname C:\output.csv | |
import arcpy | |
import sys | |
import csv |
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
module.exports = function PostGisPlugin(builder) { | |
builder.hook( | |
'GraphQLObjectType:fields', | |
( | |
fields, // Input object | |
{ extend, | |
pgGetGqlTypeByTypeId, | |
pgIntrospectionResultsByKind: introspectionResultsByKind, | |
pgSql: sql, | |
pg2gql, |
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
SELECT json_build_object( | |
'type', 'FeatureCollection', | |
'crs', json_build_object( | |
'type', 'name', | |
'properties', json_build_object( | |
'name', 'EPSG:4326' | |
) | |
), | |
'features', json_agg( | |
json_build_object( |
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
SELECT DISTINCT ON | |
( table_schema, table_name, ordinal_position ) table_schema, | |
table_name, | |
ordinal_position, | |
column_name, | |
data_type, | |
column_default, | |
is_nullable, | |
pg_description.description | |
FROM |